How to use the @patternfly/patternfly/components/EmptyState/empty-state.css.modifiers function in @patternfly/patternfly

To help you get started, we’ve selected a few @patternfly/patternfly 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 patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / EmptyState / EmptyState.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/patternfly/components/EmptyState/empty-state.css';

export const EmptyStateVariant = {
  large: 'large',
  small: 'small',
  full: 'full',
};

const maxWidthModifiers = {
  large: styles.modifiers.lg,
  small: styles.modifiers.sm,
  full: null,
}

const EmptyState = ({ children, className, variant, ...props }) => {
  const maxWidthModifier = variant && maxWidthModifiers[variant];
  return (
    <div>
      {children}
    </div>
  );
};

EmptyState.propTypes = {
  /** Additional classes added to the EmptyState */
  className: PropTypes.string,
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / EmptyState / EmptyState.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/patternfly/components/EmptyState/empty-state.css';

export const EmptyStateVariant = {
  large: 'large',
  small: 'small',
  full: 'full',
};

const maxWidthModifiers = {
  large: styles.modifiers.lg,
  small: styles.modifiers.sm,
  full: null,
}

const EmptyState = ({ children, className, variant, ...props }) =&gt; {
  const maxWidthModifier = variant &amp;&amp; maxWidthModifiers[variant];
  return (
    <div>
      {children}
    </div>
  );
};

EmptyState.propTypes = {
  /** Additional classes added to the EmptyState */
  className: PropTypes.string,
  /** Content rendered inside the EmptyState */