-
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.
Add TypeScript types for <Overlay>, <OverlayTrigger>, <Tooltip>, <Ico…
…nButton> (#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
084d711
commit 8985c07
Showing
18 changed files
with
241 additions
and
107 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,112 @@ | ||
// 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" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
className="svg-inline--fa fa-InfoOutlineIcon btn-icon__icon" | ||
data-icon="InfoOutlineIcon" | ||
data-prefix="pgn" | ||
focusable="false" | ||
role="img" | ||
style={{}} | ||
viewBox="0 0 function SvgInfoOutline(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
width: 24, | ||
height: 24, | ||
viewBox: "0 0 24 24", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("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" | ||
})); | ||
} undefined" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fill="currentColor" | ||
style={{}} | ||
/> | ||
</svg> | ||
</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.