diff --git a/packages/react-docs/pages/components/text/index.page.mdx b/packages/react-docs/pages/components/text/index.page.mdx index 9793dafce7..f884ffa311 100644 --- a/packages/react-docs/pages/components/text/index.page.mdx +++ b/packages/react-docs/pages/components/text/index.page.mdx @@ -28,6 +28,10 @@ You can format the `Text` component by passing `fontSize`, `lineHeight`, or othe {render('./formatting-text')} +### Superscript text + +{render('./superscript-text')} + ### Text truncation {render('./text-truncation')} diff --git a/packages/react-docs/pages/components/text/superscript-text.js b/packages/react-docs/pages/components/text/superscript-text.js new file mode 100644 index 0000000000..efa10cb897 --- /dev/null +++ b/packages/react-docs/pages/components/text/superscript-text.js @@ -0,0 +1,123 @@ +import { + Divider, + Flex, + Menu, + MenuDivider, + MenuItem, + MenuList, + Tab, + TabList, + Tabs, + Text, + useColorStyle, +} from '@tonic-ui/react'; +import React from 'react'; + +const SuperscriptText = ({ sx, ...rest }) => { + const [colorStyle] = useColorStyle(); + return ( + + ); +}; + +const Example1 = () => ( + + + + + MENU GROUP + + + + Menu Item + + + Menu Item + Preview + + + + +); + +const Example2 = () => { + const [colorStyle] = useColorStyle(); + return ( + + + + Product Name + + TM + + + + + App Name + + Preview + + + ); +}; + +const Example3 = () => ( + + + + + Tab Label + Preview + + + Tab Label + Preview + + + Tab Label + + + + +); + +const App = () => ( + <> + + + + + + +); + +export default App;