-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add helper texts per latest mockups
- Loading branch information
Showing
6 changed files
with
134 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { ReactNode } from 'react'; | ||
import { HelpIcon } from '@patternfly/react-icons'; | ||
import { Button, Popover } from '@patternfly/react-core'; | ||
|
||
interface InputHelpPopoverProps { | ||
headerContent?: ReactNode; | ||
bodyContent?: ReactNode; | ||
field?: string; | ||
} | ||
|
||
const InputHelpPopover: React.FC<InputHelpPopoverProps> = ({ headerContent = null, bodyContent = null, field = 'input' }) => ( | ||
<Popover headerContent={headerContent} bodyContent={bodyContent}> | ||
<Button | ||
variant="plain" | ||
aria-label={`More info for ${field}`} | ||
onClick={(e) => e.preventDefault()} | ||
aria-describedby="form-name" | ||
className="pf-v5-c-form__group-label-help" | ||
> | ||
<HelpIcon /> | ||
</Button> | ||
</Popover> | ||
); | ||
|
||
export default InputHelpPopover; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters