| 1 |
import { Button, Flex, Tooltip } from '@patternfly/react-core'; |
| 2 |
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon'; |
| 3 |
|
| 4 |
export const ButtonAriaDisabled: React.FunctionComponent = () => ( |
| 5 |
<> |
| 6 |
<Flex columnGap={{ default: 'columnGapSm' }}> |
| 7 |
<Button isAriaDisabled>Primary aria disabled</Button> |
| 8 |
<Button isAriaDisabled variant="link" icon={<RhUiAddCircleFillIcon />}> |
| 9 |
Link aria disabled |
| 10 |
</Button> |
| 11 |
<Button isAriaDisabled variant="link" isInline> |
| 12 |
Inline link aria disabled |
| 13 |
</Button> |
| 14 |
</Flex> |
| 15 |
<br /> |
| 16 |
<Flex columnGap={{ default: 'columnGapSm' }}> |
| 17 |
<Tooltip content="Aria-disabled buttons are like disabled buttons, but focusable. Allows for tooltip support."> |
| 18 |
<Button isAriaDisabled>Primary button with tooltip</Button> |
| 19 |
</Tooltip> |
| 20 |
<Tooltip content="Aria-disabled link as button with tooltip"> |
| 21 |
<Button component="a" isAriaDisabled href="https://www.patternfly.org/" target="_blank" variant="secondary"> |
| 22 |
Secondary link as button to PatternFly home |
| 23 |
</Button> |
| 24 |
</Tooltip> |
| 25 |
</Flex> |
| 26 |
</> |
| 27 |
); |