import { createConfig } from "@gluestack-style/react"export const config = createConfig({aliases: {},tokens: {},components: {Button: {// write same component name which is passed in styledtheme: {bg: "$primary500",variants: {variant: {secondary: {bg: "$secondary500",},},},},componentConfig: {descendantStyle: ["_text"],},},},} as const)
const MyButton = styled(Pressable, {bg: '$red500',p: '$3',},{componentName:"Button" // pass same component name which is passed in config});const export Button = () => <MyButton variant="secondary"/>;