Skip to content

Commit

Permalink
ButtonIcon: Add ledger.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGruffins committed Sep 15, 2023
1 parent d7ca43e commit 75e8ae0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/components/ButtonIcon/ButtonIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ ButtonIcon.propTypes = {
"privacy",
"ln",
"trezor",
"ledger",
"create",
"restore",
"watchOnly",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1402,11 +1402,12 @@ export const IconWrapper = React.forwardRef(
const defaultIconBgColor =
backgroundColor || getThemeProperty(theme, "icon-background-color");
const isStringSize = typeof size === "string";
const vb = type === "ledger" ? "0 0 148 128" : viewBox
return (
<svg
ref={ref}
onClick={onClick}
viewBox={viewBox}
viewBox={vb}
width={width ? `${width}` : isStringSize ? sizes[size] : size}
className={className}
height={height ? `${height}` : isStringSize ? sizes[size] : size}
Expand Down
6 changes: 0 additions & 6 deletions src/stories/Icon.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ export const Type = Template.bind({});
Type.args = {
type: "search",
};
export const CustomHeightWidth = Template.bind({});
CustomHeightWidth.args = {
type: "ledger",
width: "148",
height: "128",
};
export const Small = Template.bind({});
Small.args = {
type: "github",
Expand Down

0 comments on commit 75e8ae0

Please sign in to comment.