| 1 |
import { useState } from 'react'; |
| 2 |
import { Hint, HintTitle, HintBody, Button, Checkbox } from '@patternfly/react-core'; |
| 3 |
|
| 4 |
export const HintActionsWithNoOffset: React.FunctionComponent = () => { |
| 5 |
const [hasNoActionsOffset, setHasNoActionsOffset] = useState<boolean>(false); |
| 6 |
|
| 7 |
const toggleOffset = (checked: boolean) => { |
| 8 |
setHasNoActionsOffset(checked); |
| 9 |
}; |
| 10 |
|
| 11 |
const actions = <Button variant="primary">Action</Button>; |
| 12 |
return ( |
| 13 |
<> |
| 14 |
<Checkbox |
| 15 |
label="actions hasNoOffset" |
| 16 |
isChecked={hasNoActionsOffset} |
| 17 |
onChange={(_event, checked) => toggleOffset(checked)} |
| 18 |
aria-label="remove actions offset" |
| 19 |
id="toggle-actions-offset" |
| 20 |
name="toggle-actions-offset" |
| 21 |
/> |
| 22 |
<div style={{ marginTop: '15px' }}> |
| 23 |
<Hint actions={actions} hasNoActionsOffset={hasNoActionsOffset}> |
| 24 |
<HintTitle>Do more with Find it Fix it capabilities</HintTitle> |
| 25 |
<HintBody> |
| 26 |
Upgrade to Red Hat Smart Management to remediate all your systems across regions and geographies. |
| 27 |
</HintBody> |
| 28 |
</Hint> |
| 29 |
</div> |
| 30 |
</> |
| 31 |
); |
| 32 |
}; |