How to use @patternfly/react-core - 10 common examples

To help you get started, we’ve selected a few @patternfly/react-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kiali / kiali-ui / src / pages / IstioConfigDetails / IstioConfigDetailsPage.tsx View on Github external
);
      }
      if (this.state.istioObjectDetails.destinationRule) {
        return (
          
        );
      }
    } else {
      // In theory it shouldn't enter here, but we show a nice error page anyway.

      return (
        
          
          <title size="{TitleSize.lg}">
            Error loading object {this.props.match.params.object}
          </title>
          
            This might mean the resource is not ready yet or has been deleted and the cluster has not finished
            propagating the changes.
          
        
      );
    }
  };
github kiegroup / optaweb-vehicle-routing / optaweb-vehicle-routing-frontend / src / ui / pages / Visits.tsx View on Github external
export const Visits: React.FC = ({
  depot,
  visits,
  removeHandler,
}: Props) =&gt; (
  &lt;&gt;
    
      
    
    {/* TODO do not show depots */}
     undefined}
      depot={depot}
      visits={visits}
    /&gt;
  
);
github 3scale / porta / portafly / src / components / data-list / BulkActionsWidget.tsx View on Github external
const isDisabled = selectedRows.length === 0

  const [isOpen, setIsOpen] = useState(false)

  const toggle = (
    
      {t('bulk_actions.title')}
    
  )

  const warning = [
    // FIXME: add styles to look like in mockup
    
      
        
        
      
    ,
    
  ]

  const dropdownItems = useMemo(() =&gt; [
    ...(isDisabled ? warning : []),
    ...Object.keys(actions).map((key) =&gt; (
       setModal(key as BulkAction)}
      &gt;
github kiali / kiali-ui / src / components / IstioWizards / WeightedRouting.tsx View on Github external
const workloadsRows = this.state.workloads.map(workload =&gt; {
      return {
        cells: [
          &lt;&gt;
            Workload}&gt;
              WS
            
            {workload.name}
          ,
          // This &lt;&gt; wrapper is needed by Slider
          &lt;&gt;
github kiali / kiali-ui / src / components / IstioWizards / SuspendTraffic.tsx View on Github external
const workloadsRows = this.state.suspendedRoutes.map(route =&gt; {
      return {
        cells: [
          &lt;&gt;
            Workload}&gt;
              WS
            
            {route.workload}
          ,
          // Note that <button> here needs to be wrapped by an external &lt;&gt;, otherwise Icon is not properly rendered.
          &lt;&gt;
            </button><button> : }
              onClick={() =&gt; this.updateRoute(route.workload, !route.suspended)}
            &gt;
              {route.suspended ? 'Suspended' : 'Connected'}
            </button>
          
        ]
github gatblau / onix / ui / src / app / auth / Login.tsx View on Github external
};
  const listItem = (
    &lt;&gt;
      
        Terms of Use 
      
      
        Help
      
      
        Privacy Policy
      
    
  );
  const images = {
    [BackgroundImageSrc.lg]: bg_image,
    [BackgroundImageSrc.sm]: bg_image,
    [BackgroundImageSrc.sm2x]: bg_image,
    [BackgroundImageSrc.xs]: bg_image,
    [BackgroundImageSrc.xs2x]: bg_image
  };
  const loginForm = (
github fusor / mig-ui / src / HomePage / index.tsx View on Github external
position="right"
              onSelect={this.onDropdownSelect}
              isOpen={isDropdownOpen}
              toggle={
                
                  Kyle Baker
                
              }
              dropdownItems={userDropdownItems}
            /&gt;
          
        
      
    );
    const bgImages = {
      [BackgroundImageSrc.lg]: "/assets/images/pfbg_1200.jpg",
      [BackgroundImageSrc.sm]: "/assets/images/pfbg_768.jpg",
      [BackgroundImageSrc.sm2x]: "/assets/images/pfbg_768@2x.jpg",
      [BackgroundImageSrc.xs]: "/assets/images/pfbg_576.jpg",
      [BackgroundImageSrc.xs2x]: "/assets/images/pfbg_576@2x.jpg",
      [BackgroundImageSrc.filter]:
        "/assets/images/background-filter.svg#image_overlay"
    };

    const Header = (
      }
        toolbar={PageToolbar}
        // avatar={}
        showNavToggle
      /&gt;
    );
github gatblau / onix / ui / src / app / auth / Login.tsx View on Github external
const listItem = (
    &lt;&gt;
      
        Terms of Use 
      
      
        Help
      
      
        Privacy Policy
      
    
  );
  const images = {
    [BackgroundImageSrc.lg]: bg_image,
    [BackgroundImageSrc.sm]: bg_image,
    [BackgroundImageSrc.sm2x]: bg_image,
    [BackgroundImageSrc.xs]: bg_image,
    [BackgroundImageSrc.xs2x]: bg_image
  };
  const loginForm = (
github kiegroup / optaweb-vehicle-routing / optaweb-vehicle-routing-frontend / src / ui / components / Background.tsx View on Github external
*/

import { BackgroundImage, BackgroundImageSrc } from '@patternfly/react-core';
import filter from '@patternfly/react-core/dist/styles/assets/images/background-filter.svg';
/* eslint-disable camelcase */
import pfbg_1200 from '@patternfly/react-core/dist/styles/assets/images/pfbg_1200.jpg';
import pfbg_576 from '@patternfly/react-core/dist/styles/assets/images/pfbg_576.jpg';
import pfbg_576_2x from '@patternfly/react-core/dist/styles/assets/images/pfbg_576@2x.jpg';
import pfbg_768 from '@patternfly/react-core/dist/styles/assets/images/pfbg_768.jpg';
import pfbg_768_2x from '@patternfly/react-core/dist/styles/assets/images/pfbg_768@2x.jpg';
import * as React from 'react';
/* eslint-enable camelcase */

const bgImages = {
  [BackgroundImageSrc.lg]: pfbg_1200,
  [BackgroundImageSrc.sm]: pfbg_768,
  [BackgroundImageSrc.sm2x]: pfbg_768_2x,
  [BackgroundImageSrc.xs]: pfbg_576,
  [BackgroundImageSrc.xs2x]: pfbg_576_2x,
  [BackgroundImageSrc.filter]: `${filter}#image_overlay`,
};

const Background: React.FC = () =&gt; (
  
);

export default Background;
github gatblau / onix / ui / src / app / auth / Login.tsx View on Github external
&lt;&gt;
      
        Terms of Use 
      
      
        Help
      
      
        Privacy Policy
      
    
  );
  const images = {
    [BackgroundImageSrc.lg]: bg_image,
    [BackgroundImageSrc.sm]: bg_image,
    [BackgroundImageSrc.sm2x]: bg_image,
    [BackgroundImageSrc.xs]: bg_image,
    [BackgroundImageSrc.xs2x]: bg_image
  };
  const loginForm = (