Skip to content

Commit

Permalink
fix text color names
Browse files Browse the repository at this point in the history
  • Loading branch information
ink-victor committed Nov 21, 2024
1 parent 0e1dc7a commit a4065a0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export const Button = <T extends ElementType = typeof DEFAULT_BUTTON_TAG>({
}),
variantClassNames(variant, {
primary:
"ink-bg-button-primary ink-text-text-on-button-primary hover:ink-bg-button-primary-hover disabled:ink-bg-button-primary-disabled disabled:ink-text-text-on-button-primary-disabled active:ink-bg-button-primary-pressed",
"ink-bg-button-primary ink-text-text-on-primary hover:ink-bg-button-primary-hover disabled:ink-bg-button-primary-disabled disabled:ink-text-text-on-primary-disabled active:ink-bg-button-primary-pressed",
secondary:
"ink-bg-button-secondary ink-text-text-on-button-secondary hover:ink-bg-button-secondary-hover disabled:ink-bg-button-secondary-disabled disabled:ink-text-text-on-button-secondary-disabled active:ink-bg-button-secondary-pressed",
"ink-bg-button-secondary ink-text-text-on-secondary hover:ink-bg-button-secondary-hover disabled:ink-bg-button-secondary-disabled disabled:ink-text-text-on-secondary-disabled active:ink-bg-button-secondary-pressed",
}),
className
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SegmentedControl/SegmentedControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const SegmentedControl = <T extends string>({
"ink-px-4 ink-py-2 ink-rounded-full ink-relative ink-z-10 ink-transition-colors ink-duration-200 ink-select-none",
selectedOption === option.value
? "ink-text-text-default"
: "ink-text-text-on-button-secondary"
: "ink-text-text-on-secondary"
)}
ref={(el) => {
itemsRef.current[index] = el;
Expand Down
4 changes: 2 additions & 2 deletions src/styles/Colors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { classNames } from "../util/classes";

function Colors() {
const colors = [
"ink-bg-button-primary ink-text-text-on-button-primary",
"ink-bg-button-secondary ink-text-text-on-button-secondary",
"ink-bg-button-primary ink-text-text-on-primary",
"ink-bg-button-secondary ink-text-text-on-secondary",
"ink-bg-background-dark",
"ink-bg-background-dark-transparent",
"ink-bg-background-light",
Expand Down
12 changes: 6 additions & 6 deletions src/styles/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@
var(--ink-text-default),
transparent 50%
);
--ink-text-on-button-primary: rgb(255, 255, 255);
--ink-text-on-button-primary-disabled: color-mix(
--ink-text-on-primary: rgb(255, 255, 255);
--ink-text-on-primary-disabled: color-mix(
in srgb,
var(--ink-text-on-button-primary),
var(--ink-text-on-primary),
transparent 60%
);
--ink-text-on-button-secondary: rgb(113, 50, 245);
--ink-text-on-button-secondary-disabled: color-mix(
--ink-text-on-secondary: rgb(113, 50, 245);
--ink-text-on-secondary-disabled: color-mix(
in srgb,
var(--ink-text-on-button-secondary),
var(--ink-text-on-secondary),
transparent 50%
);

Expand Down
10 changes: 4 additions & 6 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ const config = {
text: {
default: "var(--ink-text-default)",
muted: "var(--ink-text-muted)",
"on-button-primary": "var(--ink-text-on-button-primary)",
"on-button-primary-disabled":
"var(--ink-text-on-button-primary-disabled)",
"on-button-secondary": "var(--ink-text-on-button-secondary)",
"on-button-secondary-disabled":
"var(--ink-text-on-button-secondary-disabled)",
"on-primary": "var(--ink-text-on-primary)",
"on-primary-disabled": "var(--ink-text-on-primary-disabled)",
"on-secondary": "var(--ink-text-on-secondary)",
"on-secondary-disabled": "var(--ink-text-on-secondary-disabled)",
},
status: {
success: "var(--ink-status-success)",
Expand Down

0 comments on commit a4065a0

Please sign in to comment.