Skip to content

Commit a1adc22

Browse files
matyasfclaude
andcommitted
fix(ui-badge,ui-scripts): use primaryTextColor for primary badge text
Use componentTheme.primaryTextColor instead of componentTheme.color for the primary badge text color, and tidy the generateStyle JSDoc. Bump @instructure/instructure-design-tokens from v1.4.0 to v1.5.0. instructure-design-tokens v1.5.0 release notes: - Badge: reduced the fontSize token from textSm to textXs for a compact appearance. - Badge: reduced the size token from 1.25rem to 1rem. - Badge: added a new primaryTextColor token that references the inverse text color (consumed by this change). - Badge: applied to canvas and rebrand themes. - BaseButton: updated all ghost background tokens to use the "color" token type instead of "text" for consistency, and adjusted alpha values in new themes. - BaseButton: institutional theming now works for secondary buttons. - TruncateText: removed the lineHeight token. - Sidenavbar: updated the globalNavLinkHover semantic color to use a navy shade instead of grey, fixing menu item hover color in light theme. Fixes INSTUI-5115 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7ff3718 commit a1adc22

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

packages/ui-badge/src/Badge/v2/styles.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ const pulseAnimation = keyframes`
4040
* private: true
4141
* ---
4242
* Generates the style object from the theme and provided additional information
43-
* @param {Object} componentTheme The theme variable object.
44-
* @param {Object} props the props of the component, the style is applied to
45-
* @param {Object} state the state of the component, the style is applied to
46-
* @return {Object} The final style object, which will be used in the component
43+
* @param componentTheme The theme variable object.
44+
* @param props the props of the component, the style is applied to
45+
* @return The final style object, which will be used in the component
4746
*/
4847
const generateStyle = (
4948
componentTheme: ReturnType<NewComponentTypes['Badge']>,
@@ -78,7 +77,7 @@ const generateStyle = (
7877
},
7978
primary: {
8079
badge: {
81-
color: componentTheme.color,
80+
color: componentTheme.primaryTextColor,
8281
backgroundColor: componentTheme.colorPrimary
8382
},
8483
pulseBorder: {

packages/ui-scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"dependencies": {
2424
"@babel/cli": "^7.27.2",
2525
"@instructure/command-utils": "workspace:*",
26-
"@instructure/instructure-design-tokens": "github:instructure/instructure-design-tokens#v1.4.0",
26+
"@instructure/instructure-design-tokens": "github:instructure/instructure-design-tokens#v1.5.0",
2727
"dprint": "^0.55.1",
2828
"http-server": "^14.1.1",
2929
"lerna": "9.0.7",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)