| 1 |
import { Fragment } from 'react'; |
| 2 |
import { HelperText, HelperTextItem } from '@patternfly/react-core'; |
| 3 |
import InfoIcon from '@patternfly/react-icons/dist/esm/icons/info-icon'; |
| 4 |
import QuestionIcon from '@patternfly/react-icons/dist/esm/icons/question-icon'; |
| 5 |
import ExclamationIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-icon'; |
| 6 |
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon'; |
| 7 |
import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon'; |
| 8 |
|
| 9 |
export const HelperTextWithCustomIcon: React.FunctionComponent = () => ( |
| 10 |
<Fragment> |
| 11 |
<HelperText> |
| 12 |
<HelperTextItem icon={<InfoIcon />}>This is default helper text</HelperTextItem> |
| 13 |
</HelperText> |
| 14 |
<HelperText> |
| 15 |
<HelperTextItem variant="indeterminate" icon={<QuestionIcon />}> |
| 16 |
This is indeterminate helper text |
| 17 |
</HelperTextItem> |
| 18 |
</HelperText> |
| 19 |
<HelperText> |
| 20 |
<HelperTextItem variant="warning" icon={<ExclamationIcon />}> |
| 21 |
This is warning helper text |
| 22 |
</HelperTextItem> |
| 23 |
</HelperText> |
| 24 |
<HelperText> |
| 25 |
<HelperTextItem variant="success" icon={<CheckIcon />}> |
| 26 |
This is success helper text |
| 27 |
</HelperTextItem> |
| 28 |
</HelperText> |
| 29 |
<HelperText> |
| 30 |
<HelperTextItem variant="error" icon={<RhMicronsCloseIcon />}> |
| 31 |
This is error helper text |
| 32 |
</HelperTextItem> |
| 33 |
</HelperText> |
| 34 |
</Fragment> |
| 35 |
); |