File size: 1,854 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
import { defineRecipe } from "../def"
export const textareaRecipe = defineRecipe({
className: "textarea",
base: {
width: "100%",
minWidth: "0",
outline: "0",
position: "relative",
appearance: "none",
textAlign: "start",
borderRadius: "l2",
_disabled: {
layerStyle: "disabled",
},
"--focus-color": "colors.colorPalette.focusRing",
"--error-color": "colors.border.error",
_invalid: {
focusRingColor: "var(--error-color)",
borderColor: "var(--error-color)",
},
},
variants: {
size: {
xs: {
textStyle: "xs",
px: "2",
py: "1.5",
scrollPaddingBottom: "1.5",
},
sm: {
textStyle: "sm",
px: "2.5",
py: "2",
scrollPaddingBottom: "2",
},
md: {
textStyle: "sm",
px: "3",
py: "2",
scrollPaddingBottom: "2",
},
lg: {
textStyle: "md",
px: "4",
py: "3",
scrollPaddingBottom: "3",
},
xl: {
textStyle: "md",
px: "4.5",
py: "3.5",
scrollPaddingBottom: "3.5",
},
},
variant: {
outline: {
bg: "transparent",
borderWidth: "1px",
borderColor: "border",
focusVisibleRing: "inside",
},
subtle: {
borderWidth: "1px",
borderColor: "transparent",
bg: "bg.muted",
focusVisibleRing: "inside",
},
flushed: {
bg: "transparent",
borderBottomWidth: "1px",
borderBottomColor: "border",
borderRadius: "0",
px: "0",
_focusVisible: {
borderColor: "var(--focus-color)",
boxShadow: "0px 1px 0px 0px var(--focus-color)",
},
},
},
},
defaultVariants: {
size: "md",
variant: "outline",
},
})
|