From e5bd8feb9bda90ba74acb5c45ef49a3a91ee995d Mon Sep 17 00:00:00 2001 From: Hyeonjong Date: Mon, 25 Nov 2024 22:26:08 +0900 Subject: [PATCH] Replace alternative with chip components --- .../components/02-data-display/05-divider.mdx | 29 ++++--------------- .../02-data-display/09-typography.mdx | 17 ++++------- .../src/demos/divider/ChildPosition.tsx | 15 ++-------- .../src/demos/divider/RenderedWithContent.tsx | 15 ++-------- .../src/demos/typography/Decorators.tsx | 17 +++-------- 5 files changed, 18 insertions(+), 75 deletions(-) diff --git a/apps/website/docs/components/02-data-display/05-divider.mdx b/apps/website/docs/components/02-data-display/05-divider.mdx index b510574..1e483b6 100644 --- a/apps/website/docs/components/02-data-display/05-divider.mdx +++ b/apps/website/docs/components/02-data-display/05-divider.mdx @@ -31,7 +31,7 @@ Use the `Divider` to wrap elements that will be added to it. ```tsx -import { Box, Divider } from 'tailwind-joy/components'; +import { Box, Chip, Divider } from 'tailwind-joy/components'; export function DividerRenderedWithContent() { const content = ( @@ -48,17 +48,7 @@ export function DividerRenderedWithContent() { Visual indicator {content} -
- - Visual indicator - -
+ Visual indicator
{content} @@ -145,7 +135,7 @@ To control the position of the content, override the CSS variable `--Divider-chi ```tsx import { useState } from 'react'; -import { Box, Divider } from 'tailwind-joy/components'; +import { Box, Chip, Divider } from 'tailwind-joy/components'; declare module 'react' { interface CSSProperties { @@ -168,17 +158,7 @@ export function DividerChildPosition() { {content} -
- - Visual indicator - -
+ Visual indicator
{content}
@@ -220,4 +200,5 @@ Otherwise, the Divider component is composed of a single root `
` element. See the documentation below for a complete reference to all of the props available to the components mentioned here. - [``](../apis/box) +- [``](../apis/chip) - [``](../apis/divider) diff --git a/apps/website/docs/components/02-data-display/09-typography.mdx b/apps/website/docs/components/02-data-display/09-typography.mdx index f5e139c..c4f6f2f 100644 --- a/apps/website/docs/components/02-data-display/09-typography.mdx +++ b/apps/website/docs/components/02-data-display/09-typography.mdx @@ -280,7 +280,7 @@ Use the `startDecorator` and `endDecorator` props to add supporting icons or ele ```tsx import { MdInfoOutline } from 'react-icons/md'; -import { Typography } from 'tailwind-joy/components'; +import { Chip, Typography } from 'tailwind-joy/components'; import { iconClass } from 'tailwind-joy/utils'; export function TypographyDecorators() { @@ -295,17 +295,9 @@ export function TypographyDecorators() { - - 123 - - + + 123 + } className="justify-center" > @@ -336,5 +328,6 @@ When one Typography component is nested within another, the nested component ren See the documentation below for a complete reference to all of the props available to the components mentioned here. - [``](../apis/box) +- [``](../apis/chip) - [``](../apis/sheet) - [``](../apis/typography) diff --git a/apps/website/src/demos/divider/ChildPosition.tsx b/apps/website/src/demos/divider/ChildPosition.tsx index 5a63cae..01810de 100644 --- a/apps/website/src/demos/divider/ChildPosition.tsx +++ b/apps/website/src/demos/divider/ChildPosition.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { Box, Divider } from 'tailwind-joy/components'; +import { Box, Chip, Divider } from 'tailwind-joy/components'; import { DisplayStand } from '@site/src/components/docs/DisplayStand'; declare module 'react' { @@ -25,18 +25,7 @@ export function DividerChildPosition() { {content} - {/* TODO: Replace div with Chip. */} -
- - Visual indicator - -
+ Visual indicator
{content}
diff --git a/apps/website/src/demos/divider/RenderedWithContent.tsx b/apps/website/src/demos/divider/RenderedWithContent.tsx index 62df708..254165b 100644 --- a/apps/website/src/demos/divider/RenderedWithContent.tsx +++ b/apps/website/src/demos/divider/RenderedWithContent.tsx @@ -1,4 +1,4 @@ -import { Box, Divider } from 'tailwind-joy/components'; +import { Box, Chip, Divider } from 'tailwind-joy/components'; import { DisplayStand } from '@site/src/components/docs/DisplayStand'; export function DividerRenderedWithContent() { @@ -18,18 +18,7 @@ export function DividerRenderedWithContent() { Visual indicator {content} - {/* TODO: Replace div with Chip. */} -
- - Visual indicator - -
+ Visual indicator
{content}
diff --git a/apps/website/src/demos/typography/Decorators.tsx b/apps/website/src/demos/typography/Decorators.tsx index 66a5d57..0e560f7 100644 --- a/apps/website/src/demos/typography/Decorators.tsx +++ b/apps/website/src/demos/typography/Decorators.tsx @@ -1,5 +1,5 @@ import { MdInfoOutline } from 'react-icons/md'; -import { Typography } from 'tailwind-joy/components'; +import { Chip, Typography } from 'tailwind-joy/components'; import { iconClass } from 'tailwind-joy/utils'; import { DisplayStand } from '@site/src/components/docs/DisplayStand'; @@ -16,18 +16,9 @@ export function TypographyDecorators() { - - 123 - - + + 123 + } className="justify-center" >