-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This introduces a TooltipIcon component that can be used as a trigger. It will help with consistent tooltip icon usage. There are new docs that outline how to use the icons. Closes D2IQ-97013
- Loading branch information
1 parent
be4dc83
commit d6b62ab
Showing
6 changed files
with
49 additions
and
22 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import { SystemIcons } from "../../icons/dist/system-icons-enum"; | ||
import { Icon } from "../../icon"; | ||
import { greyLightDarken1 } from "../../design-tokens/build/js/designTokens"; | ||
import { IconProps } from "../../icon/components/Icon"; | ||
|
||
interface TooltipIconProps extends Omit<IconProps, "shape"> { | ||
/** | ||
* Icon to display, choose either (i) or (?). | ||
*/ | ||
shape?: SystemIcons.CircleInformation | SystemIcons.CircleQuestion; | ||
} | ||
|
||
const TooltipIcon = ({ | ||
shape = SystemIcons.CircleInformation, | ||
...iconProps | ||
}: TooltipIconProps) => { | ||
return ( | ||
<Icon shape={shape} size="xs" color={greyLightDarken1} {...iconProps} /> | ||
); | ||
}; | ||
|
||
export default TooltipIcon; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as Tooltip } from "./components/Tooltip"; | ||
export { default as TooltipIcon } from "./components/TooltipIcon"; |
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