diff --git a/design-system/IconButton/IconButton.example.tsx b/design-system/IconButton/IconButton.example.tsx new file mode 100644 index 000000000..63eaff88c --- /dev/null +++ b/design-system/IconButton/IconButton.example.tsx @@ -0,0 +1,47 @@ +import { memo } from "react"; + +import { useAppTheme } from "../../theme/useAppTheme"; +import { HStack } from "../HStack"; +import { VStack } from "../VStack"; +import { IconButton } from "./IconButton"; + +export const IconButtonExample = memo(function IconButtonExample() { + const { theme } = useAppTheme(); + + return ( + + + {/* Fill Variant */} + + + + + + + {/* Outline Variant */} + + + + + + + {/* Ghost Variant */} + + + + + + + + ); +}); diff --git a/design-system/IconButton/IconButton.styles.ts b/design-system/IconButton/IconButton.styles.ts index 44b822d73..ebd8947a5 100644 --- a/design-system/IconButton/IconButton.styles.ts +++ b/design-system/IconButton/IconButton.styles.ts @@ -37,13 +37,13 @@ export const getIconButtonViewStyle = // Set size const sizeStyles = { md: { - width: spacing.xl, - height: spacing.xl, - }, - lg: { width: spacing.xxl, height: spacing.xxl, }, + lg: { + width: spacing["3xl"], + height: spacing["3xl"], + }, }; Object.assign(style, sizeStyles[size]); @@ -65,9 +65,10 @@ export const getIconButtonViewStyle = style.backgroundColor = "transparent"; if (pressed) { style.backgroundColor = colors.fill.minimal; + style.borderColor = colors.fill.minimal; } if (disabled) { - style.borderColor = colors.border.secondary; + style.borderColor = colors.border.subtle; style.backgroundColor = "transparent"; } break; @@ -171,7 +172,7 @@ export const getIconProps = props.size = sizeMap[size]; - if (disabled) { + if (disabled && variant !== "fill") { props.color = colors.text.tertiary; return props; }