Skip to content

Commit

Permalink
docs(changeset): Use semanticColor instead of color
Browse files Browse the repository at this point in the history
  • Loading branch information
jandrade committed Jan 8, 2025
1 parent 5fde470 commit b05461e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-onions-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/wonder-blocks-clickable": patch
---

Use semanticColor instead of color
12 changes: 7 additions & 5 deletions packages/wonder-blocks-clickable/src/components/clickable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {__RouterContext} from "react-router";

import {addStyle} from "@khanacademy/wonder-blocks-core";
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
import {color} from "@khanacademy/wonder-blocks-tokens";
import {color, semanticColor} from "@khanacademy/wonder-blocks-tokens";

Check failure on line 8 in packages/wonder-blocks-clickable/src/components/clickable.tsx

View workflow job for this annotation

GitHub Actions / Lint / Lint (ubuntu-latest, 20.x)

'color' is defined but never used. Allowed unused vars must match /^_*$/u

import getClickableBehavior from "../util/get-clickable-behavior";
import type {ClickableRole, ClickableState} from "./clickable-behavior";
Expand Down Expand Up @@ -410,20 +410,22 @@ const styles = StyleSheet.create({
},
focused: {
":focus": {
outline: `solid 2px ${color.blue}`,
// TODO(juan): do we need to define a "focused" border color token?
outline: `solid 2px ${semanticColor.action.primary.default}`,
},
},
focusedLight: {
outline: `solid 2px ${color.white}`,
outline: `solid 2px ${semanticColor.border.inverse}`,
},
disabled: {
color: color.offBlack32,
color: semanticColor.text.disabled,
cursor: "not-allowed",
":focus": {
outline: "none",
},
":focus-visible": {
outline: `solid 2px ${color.blue}`,
// TODO(juan): do we need to define a "disabled" border color token?
outline: `solid 2px ${semanticColor.action.disabled.default}`,
},
},
});

0 comments on commit b05461e

Please sign in to comment.