Skip to content

Commit

Permalink
Update increment/decrement icon colors for NumberInput (#224)
Browse files Browse the repository at this point in the history
* chore(NumberInput): update default stepper trigger icon colors

* ci(changesets): add changeset for NumberInput changes

* refactor(NumberInput): update divider color for stepper on disabled state

* fix(NumberInput): remove unnecessary disabled prob to fix tests
  • Loading branch information
hobbescodes authored Jan 23, 2024
1 parent ae57729 commit 9aec3c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-elephants-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@animareflection/ui": patch
---

Update default `Icon` color for increment and decrement triggers in `NumberInput`
2 changes: 1 addition & 1 deletion src/components/core/NumberInput/NumberInput.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const stepperTriggerStyles = {
h: "100%",
color: {
base: "fg.default",
_disabled: "fg.muted",
_disabled: "fg.disabled",
},
borderRadius: "sm",
};
Expand Down
14 changes: 10 additions & 4 deletions src/components/core/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,21 @@ const NumberInput = ({
</PrimitiveNumberInputAddon>
)}
{stepper && (
<PrimitiveNumberInputControl>
<PrimitiveNumberInputControl className="group">
<PrimitiveNumberInputDecrementTrigger>
<Icon>
<Icon color="inherit">
<FiMinus />
</Icon>
</PrimitiveNumberInputDecrementTrigger>
<panda.div w="1px" h="75%" mx={0.5} my="auto" bgColor="gray.600" />
<panda.div
w="1px"
h="75%"
mx={0.5}
my="auto"
bgColor={{ base: "fg.default", _groupDisabled: "fg.disabled" }}
/>
<PrimitiveNumberInputIncrementTrigger>
<Icon>
<Icon color="inherit">
<FiPlus />
</Icon>
</PrimitiveNumberInputIncrementTrigger>
Expand Down

1 comment on commit 9aec3c8

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for ui-storybook ready!

✅ Preview
https://ui-storybook-g842gr0v1-animareflection.vercel.app

Built with commit 9aec3c8.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.