| 1 |
--- |
| 2 |
id: Hint |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-hint |
| 5 |
propComponents: ['Hint', 'HintTitle', 'HintBody', 'HintFooter'] |
| 6 |
--- |
| 7 |
|
| 8 |
import { Fragment, useState } from 'react'; |
| 9 |
import RhUiEllipsisVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon'; |
| 10 |
|
| 11 |
## Examples |
| 12 |
|
| 13 |
### Basic with title |
| 14 |
|
| 15 |
```ts file="HintBasicWithTitle.tsx" |
| 16 |
|
| 17 |
``` |
| 18 |
|
| 19 |
### Basic without title |
| 20 |
|
| 21 |
```ts file="HintBasicWithoutTitle.tsx" |
| 22 |
|
| 23 |
``` |
| 24 |
|
| 25 |
### With actions |
| 26 |
|
| 27 |
You can add actions to a hint to allow users to respond to suggestions and initiate any related processes. |
| 28 |
|
| 29 |
When a `<Hint>` contains `actions`, a negative margin is applied to the actions so that they are better aligned with the hint title. For larger-sized titles or non-plain actions (such as a button), remove this negative margin by setting `hasNoActionsOffset` to `true`. |
| 30 |
|
| 31 |
To illustrate this behavior, select the "actions hasNoActionsOffset" checkbox in the following example. |
| 32 |
|
| 33 |
```ts file="HintActionsWithNoOffset.tsx" |
| 34 |
|
| 35 |
``` |