import { styled } from "@dank-style/react"export const Button = styled(Pressable,{rounded: "$lg",py: "$3",px: "$9",variants: {variant: {solid: { bg: "$backgroundLight100" },outline: {bg: " rgba(255, 255, 255, 0.24)",borderWidth: "$1",borderColor: "$borderLight100",},},},},{})
const config = {tokens: {colors: {primary50: "#dbf4ff",primary100: "#addbff",primary200: "#7cc2ff",primary300: "#4aa9ff",primary400: "#1a91ff",},space: {"0": 0,"0.5": 2,"1": 4,"1.5": 6,},fontSizes: {"2xs": 10,xs: 12,sm: 14,md: 16,},fontWeights: {},fonts: {},borderWidths: {},radii: {},},}
function App() {const Box = styled(View, {borderRadius: "$md",h: "$20",w: "$20",_web: {bg: "$violet600",},_ios: {bg: "$blue600",},_android: {bg: "$red600",},})return (<Provider config={config}><Box /></Provider>)}
function App() {const Box = styled(View, {})return (<Provider config={config}><Box bg="$cyan600" h="$20" w="$20" rounded="$md" /></Provider>)}
function App() {const Button = styled(Pressable,{px: "$3.5",py: "$2.5",rounded: "$md",variants: {variant: {solid: {bg: "$indigo600",_text: {color: "$white",},},outlined: {bg: "transparent",borderWidth: "$1",borderColor: "$indigo500",_text: {color: "$indigo300",},},subtle: {bg: "$indigo800_50",_text: {color: "$indigo300",},},},},defaultProps: {variant: "solid",},},{descendantStyle: ["_text"],})const ButtonText = styled(Text,{textAlign: "center",fontSize: "$md",lineHeight: "$md",},{ ancestorStyle: ["_text"] })return (<Provider config={config}><View style={{ flexDirection: "row", gap: 16 }}><Button variant="solid"><ButtonText>Solid</ButtonText></Button><Button variant="outlined"><ButtonText>Outlined</ButtonText></Button><Button variant="subtle"><ButtonText>Sublte</ButtonText></Button></View></Provider>)}
function App() {const Button = styled(Pressable, {bg: "$red500",p: "$3",rounded: "$md",shadow: "$4",":hover": {bg: "$red600",},":active": {bg: "$red700",},"@md": {bg: "$blue500",":hover": {bg: "$blue600",},":active": {bg: "$blue700",},},})const ButtonText = styled(Text, {color: "$textDark50",fontSize: "$md",lineHeight: "$md",textAlign: "center",})const [isHovered, setIsHovered] = useState(false)const [isActive, setIsActive] = useState(false)return (<Provider config={config}><Buttonstates={{ hover: isHovered, active: isActive }}onMouseEnter={() => setIsHovered(true)}onMouseLeave={() => setIsHovered(false)}onMouseDown={() => setIsActive(true)}onMouseUp={() => setIsActive(false)}><ButtonText>Hello World</ButtonText></Button></Provider>)}