diff --git a/.changeset/small-walls-destroy.md b/.changeset/small-walls-destroy.md new file mode 100644 index 000000000..01cd82513 --- /dev/null +++ b/.changeset/small-walls-destroy.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-button": patch +--- + +Fixes an issue on the icon color where it was using the incorrect value over dark backgrounds. The icon color now inherits the color from the button to preserve the same color defined for the text. diff --git a/__docs__/wonder-blocks-button/button.stories.tsx b/__docs__/wonder-blocks-button/button.stories.tsx index a3dfa98bd..7980236d7 100644 --- a/__docs__/wonder-blocks-button/button.stories.tsx +++ b/__docs__/wonder-blocks-button/button.stories.tsx @@ -409,6 +409,26 @@ const IconExample = () => ( ))} + Over a dark background + + {kinds.map((kind, idx) => ( + + ))} + ); diff --git a/packages/wonder-blocks-button/src/themes/default.ts b/packages/wonder-blocks-button/src/themes/default.ts index 63ef85d46..fde16661e 100644 --- a/packages/wonder-blocks-button/src/themes/default.ts +++ b/packages/wonder-blocks-button/src/themes/default.ts @@ -73,7 +73,9 @@ const theme = { * Icons */ icon: { - secondaryHover: tokens.color.blue, + // Allows the icon to be visible on hover in both light and dark + // backgrounds. + secondaryHover: "inherit", }, }, border: {