Skip to content

Commit

Permalink
fix: Update to use stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel.carrera committed Oct 21, 2024
1 parent 6306823 commit 98ec8c1
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions modules/react/_examples/stories/mdx/examples/Density.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ const formFieldStencil = createStencil({
],
});

const creditCardInputStyles = createStyles({
width: calc.add(system.space.x10, system.space.x10),
minWidth: calc.add(system.space.x10, system.space.x10),
textAlign: 'center',
});

const selectStencil = createStencil({
base: {},
modifiers: {
Expand Down Expand Up @@ -187,7 +181,9 @@ const selectStencil = createStencil({
});

const inputStencil = createStencil({
base: {},
base: {
minWidth: px2rem(200),
},
modifiers: {
density: {
high: {
Expand All @@ -207,6 +203,15 @@ const inputStencil = createStencil({
},
});

const creditCardInputStencil = createStencil({
extends: inputStencil,
base: {
width: calc.add(system.space.x10, system.space.x10),
minWidth: calc.add(system.space.x10, system.space.x10),
textAlign: 'center',
},
});

const flexContainerStencil = createStencil({
base: {
display: 'flex',
Expand Down Expand Up @@ -409,20 +414,20 @@ export const Density = () => {
<FormFieldGroup.Input
as={TextInput}
placeholder="XXXX"
cs={[inputStencil({density}), creditCardInputStyles]}
cs={creditCardInputStencil({density})}
/>
<FormFieldGroup.Input
as={TextInput}
placeholder="XXXX"
cs={[inputStencil({density}), creditCardInputStyles]}
cs={creditCardInputStencil({density})}
/>
<FormFieldGroup.Input
as={TextInput}
placeholder="XXXX"
cs={[inputStencil({density}), creditCardInputStyles]}
cs={creditCardInputStencil({density})}
/>
<FormFieldGroup.Input
cs={[inputStencil({density}), creditCardInputStyles]}
cs={creditCardInputStencil({density})}
placeholder="XXXX"
as={TextInput}
/>
Expand Down

0 comments on commit 98ec8c1

Please sign in to comment.