Skip to content

Commit

Permalink
fix: reaction button stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Dec 23, 2024
1 parent ba418b8 commit b379c23
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/public/rootage/components/reaction-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
},
"disabled": {
"root": {
"color": "$color.bg.disabled"
"color": "$color.bg.disabled",
"strokeWidth": "0px"
},
"label": {
"color": "$color.fg.disabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const reactionButton = defineRecipe({
[pseudo(disabled)]: {
cursor: "not-allowed",
background: vars.base.disabled.root.color,
boxShadow: `inset 0 0 0 ${vars.base.disabled.root.strokeWidth} ${vars.base.selected.root.strokeColor}`,
},
[pseudo(loading)]: {
background: vars.base.loading.root.color,
Expand Down Expand Up @@ -91,6 +92,12 @@ const reactionButton = defineRecipe({
position: "absolute",
display: "none",

"--track-color": vars.base.enabled.progressCircle.trackColor,
"--range-color": vars.base.enabled.progressCircle.rangeColor,
[pseudo(pressed)]: {
"--track-color": vars.base.selected.progressCircle.trackColor,
"--range-color": vars.base.selected.progressCircle.rangeColor,
},
[pseudo(loading)]: {
display: "flex",
},
Expand Down
1 change: 1 addition & 0 deletions packages/rootage/artifacts/components/reaction-button.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ data:
disabled:
root:
color: $color.bg.disabled
strokeWidth: 0px
label:
color: $color.fg.disabled
count:
Expand Down
7 changes: 7 additions & 0 deletions packages/stylesheet/reactionButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.reactionButton__root:is(:disabled, [disabled], [data-disabled]) {
cursor: not-allowed;
background: var(--seed-v3-color-bg-disabled);
box-shadow: inset 0 0 0 0px var(--seed-v3-color-stroke-brand);
}
.reactionButton__root[data-loading] {
background: var(--seed-v3-color-bg-neutral-weak-pressed);
Expand Down Expand Up @@ -81,6 +82,12 @@
.reactionButton__progressCircle {
position: absolute;
display: none;
--track-color: var(--seed-v3-color-palette-gray-500);
--range-color: var(--seed-v3-color-fg-neutral);
}
.reactionButton__progressCircle:is([aria-pressed=true], [data-pressed]) {
--track-color: var(--seed-v3-color-palette-carrot-200);
--range-color: var(--seed-v3-color-fg-brand);
}
.reactionButton__progressCircle[data-loading] {
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion packages/vars/lib/component/reaction-button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export declare const vars: {
},
"disabled": {
"root": {
"color": "var(--seed-v3-color-bg-disabled)"
"color": "var(--seed-v3-color-bg-disabled)",
"strokeWidth": "0px"
},
"label": {
"color": "var(--seed-v3-color-fg-disabled)"
Expand Down
3 changes: 2 additions & 1 deletion packages/vars/lib/component/reaction-button.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export const vars = {
},
"disabled": {
"root": {
"color": "var(--seed-v3-color-bg-disabled)"
"color": "var(--seed-v3-color-bg-disabled)",
"strokeWidth": "0px"
},
"label": {
"color": "var(--seed-v3-color-fg-disabled)"
Expand Down

0 comments on commit b379c23

Please sign in to comment.