Skip to content

Commit

Permalink
fix(theme/recipes): add NumberInput disabled styles (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeferson-sb authored Sep 14, 2024
1 parent 4327ade commit 53235fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export const MinAndMax = () => (
Max is 5 and Min is 0
</NumberInput>
)
export const Disabled = () => <NumberInput disabled>Disabled</NumberInput>
7 changes: 7 additions & 0 deletions packages/panda/src/theme/recipes/number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,20 @@ export const numberInput = defineSlotRecipe({
borderColor: 'colorPalette.default',
boxShadow: '0 0 0 1px var(--colors-color-palette-default)',
},
_disabled: {
opacity: 0.4,
cursor: 'not-allowed',
},
},
input: {
background: 'transparent',
border: 'none',
gridRow: '2',
outline: 'none',
width: 'full',
_disabled: {
cursor: 'not-allowed',
},
},
label: {
color: 'fg.default',
Expand Down

0 comments on commit 53235fb

Please sign in to comment.