UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 1.62 kB
{"version":3,"file":"card.cjs","names":["createSlotComponent","cardStyle"],"sources":["../../../../src/components/card/card.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { CardStyle } from \"./card.style\"\nimport { createSlotComponent } from \"../../core\"\nimport { cardStyle } from \"./card.style\"\n\nexport interface CardRootProps\n extends HTMLStyledProps<\"article\">,\n ThemeProps<CardStyle> {}\n\nconst {\n PropsContext: CardPropsContext,\n usePropsContext: useCardPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<CardRootProps, CardStyle>(\"card\", cardStyle)\n\nexport { CardPropsContext, useCardPropsContext }\n\n/**\n * `Card` is a component that groups and displays related information. By default, it renders a `article` element.\n *\n * @see https://yamada-ui.com/docs/components/card\n */\nexport const CardRoot = withProvider(\"article\", \"root\")()\n\nexport interface CardHeaderProps extends HTMLStyledProps<\"header\"> {}\n\nexport const CardHeader = withContext(\"header\", \"header\")()\n\nexport interface CardBodyProps extends HTMLStyledProps {}\n\nexport const CardBody = withContext(\"div\", \"body\")()\n\nexport interface CardFooterProps extends HTMLStyledProps<\"footer\"> {}\n\nexport const CardFooter = withContext(\"footer\", \"footer\")()\n"],"mappings":";;;;;;;AAWA,MAAM,EACJ,cAAc,kBACd,iBAAiB,qBACjB,aACA,iBACEA,6CAA8C,QAAQC,6BAAU;;;;;;AASpE,MAAa,WAAW,aAAa,WAAW,OAAO,EAAE;AAIzD,MAAa,aAAa,YAAY,UAAU,SAAS,EAAE;AAI3D,MAAa,WAAW,YAAY,OAAO,OAAO,EAAE;AAIpD,MAAa,aAAa,YAAY,UAAU,SAAS,EAAE"}