@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 1.6 kB
Source Map (JSON)
{"version":3,"file":"text.cjs","names":["createComponent","textStyle"],"sources":["../../../../src/components/text/text.tsx"],"sourcesContent":["\"use client\"\n\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { TextStyle } from \"./text.style\"\nimport { createComponent } from \"../../core\"\nimport { textStyle } from \"./text.style\"\n\nexport interface TextProps extends HTMLStyledProps<\"p\">, ThemeProps<TextStyle> {\n /**\n * The CSS `text-align` property.\n */\n align?: CSSProps[\"textAlign\"]\n /**\n * The CSS `text-transform` property.\n */\n casing?: CSSProps[\"textTransform\"]\n /**\n * The CSS `text-decoration` property.\n */\n decoration?: CSSProps[\"textDecoration\"]\n}\n\nconst {\n PropsContext: TextPropsContext,\n usePropsContext: useTextPropsContext,\n withContext,\n} = createComponent<TextProps, TextStyle>(\"text\", textStyle)\n\nexport { TextPropsContext, useTextPropsContext }\n\n/**\n * `Text` is a component that represents a paragraph of text. By default, it renders a `p` element.\n *\n * @see https://yamada-ui.com/docs/components/text\n */\nexport const Text = withContext(\"p\")(\n undefined,\n ({\n align: textAlign,\n casing: textTransform,\n decoration: textDecoration,\n ...rest\n }) => ({\n textAlign,\n textDecoration,\n textTransform,\n ...rest,\n }),\n)\n"],"mappings":";;;;;;;AAsBA,MAAM,EACJ,cAAc,kBACd,iBAAiB,qBACjB,gBACEA,yCAAsC,QAAQC,6BAAU;;;;;;AAS5D,MAAa,OAAO,YAAY,IAAI,CAClC,SACC,EACC,OAAO,WACP,QAAQ,eACR,YAAY,eACZ,GAAG,YACE;CACL;CACA;CACA;CACA,GAAG;CACJ,EACF"}