-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add TypeScript types for <Overlay>, <OverlayTrigger>, <Tooltip>…
…, <IconButton> (#3100) * feat: add typings for <Overlay> and <OverlayTrigger> * feat: add typings for <Tooltip> * feat: add typings for <IconButton> * chore: typing cleanups for <Chip> code * feat: slightly more detailed types for <Chip/ChipIcon> - per review
- Loading branch information
1 parent
2aa59a7
commit 0e16dbb
Showing
20 changed files
with
228 additions
and
96 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
File renamed without changes.
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
export const STYLE_VARIANTS = { | ||
DARK: 'dark', | ||
LIGHT: 'light', | ||
}; | ||
} as const; |
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 was deleted.
Oops, something went wrong.
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,90 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<IconButton /> <IconButton.IconButtonWithTooltip> renders with required props 1`] = ` | ||
<button | ||
aria-label="alternative" | ||
className="btn-icon btn-icon-primary btn-icon-md" | ||
onBlur={[Function]} | ||
onClick={[Function]} | ||
onFocus={[Function]} | ||
onMouseOut={[Function]} | ||
onMouseOver={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="btn-icon__icon-container" | ||
> | ||
<span | ||
className="pgn__icon btn-icon__icon" | ||
> | ||
<svg | ||
aria-hidden={true} | ||
fill="none" | ||
focusable={false} | ||
height={24} | ||
role="img" | ||
viewBox="0 0 24 24" | ||
width={24} | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
</span> | ||
</span> | ||
</button> | ||
`; | ||
exports[`<IconButton /> renders with deprecated props 1`] = ` | ||
<button | ||
aria-label="alternative" | ||
className="btn-icon btn-icon-primary btn-icon-md" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="btn-icon__icon-container" | ||
> | ||
<span | ||
aria-hidden={true} | ||
className="btn-icon__icon" | ||
id="Icon1" | ||
/> | ||
</span> | ||
</button> | ||
`; | ||
exports[`<IconButton /> renders with required props 1`] = ` | ||
<button | ||
aria-label="alternative" | ||
className="btn-icon btn-icon-primary btn-icon-md" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="btn-icon__icon-container" | ||
> | ||
<span | ||
className="pgn__icon btn-icon__icon" | ||
> | ||
<svg | ||
aria-hidden={true} | ||
fill="none" | ||
focusable={false} | ||
height={24} | ||
role="img" | ||
viewBox="0 0 24 24" | ||
width={24} | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
</span> | ||
</span> | ||
</button> | ||
`; |
Oops, something went wrong.