mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
36 lines
697 B
TypeScript
36 lines
697 B
TypeScript
import { defineSlotRecipe } from '@chakra-ui/react';
|
|
|
|
import { mapEntries } from '../utils/entries';
|
|
import { recipe as inputRecipe } from './input.recipe';
|
|
|
|
const { variants } = inputRecipe;
|
|
|
|
export const recipe = defineSlotRecipe({
|
|
slots: [ 'input' ],
|
|
base: {
|
|
input: {
|
|
...inputRecipe.base,
|
|
textAlign: 'center',
|
|
width: 'var(--input-height)',
|
|
},
|
|
},
|
|
variants: {
|
|
size: {
|
|
md: {
|
|
input: {
|
|
boxSize: 10,
|
|
borderRadius: 'base',
|
|
},
|
|
},
|
|
},
|
|
variant: mapEntries(variants!.variant, (key, value) => [
|
|
key,
|
|
{ input: value },
|
|
]),
|
|
},
|
|
defaultVariants: {
|
|
size: 'md',
|
|
variant: 'outline',
|
|
},
|
|
});
|