@patternfly/react-core#EmptyStateVariant JavaScript Examples

The following examples show how to use @patternfly/react-core#EmptyStateVariant. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmptyStateDisplay.js    From tasks-frontend with Apache License 2.0 6 votes vote down vote up
EmptyStateDisplay = ({
  button,
  color,
  error,
  icon,
  isSmall,
  text,
  title,
}) => {
  return (
    <EmptyState
      variant={isSmall ? EmptyStateVariant.small : EmptyStateVariant.large}
    >
      {icon ? (
        <EmptyStateIcon
          icon={icon}
          color={color ? color : null}
          className={isSmall ? 'small-empty-state-icon' : null}
        />
      ) : null}
      <br></br>
      <Title headingLevel={isSmall ? 'h5' : 'h1'} size={isSmall ? 'md' : 'lg'}>
        {title}
      </Title>
      <EmptyStateBody>
        {text
          ? text.map((line, index) => (
              <React.Fragment key={`line-${index}`}>
                {line}
                <br />
              </React.Fragment>
            ))
          : null}
        {error ? error : null}
      </EmptyStateBody>
      {button}
    </EmptyState>
  );
}
Example #2
Source File: NoResultsTable.js    From tasks-frontend with Apache License 2.0 6 votes vote down vote up
NoResultsTable = ({ type }) => (
  <EmptyTable>
    <Bullseye>
      <EmptyState variant={EmptyStateVariant.full}>
        <Title headingLevel="h5" size="lg">
          {`No matching ${type} found`}
        </Title>
        <EmptyStateBody>
          To continue, edit your filter settings and search again.
        </EmptyStateBody>
      </EmptyState>
    </Bullseye>
  </EmptyTable>
)