diff --git a/packages/components/src/divider-label/divider-label.stories.tsx b/packages/components/src/divider-label/divider-label.stories.tsx new file mode 100644 index 00000000..0f34e0ef --- /dev/null +++ b/packages/components/src/divider-label/divider-label.stories.tsx @@ -0,0 +1,25 @@ +import { DividerLabel } from './divider-label' + +import type { Meta, StoryObj } from '@storybook/react' + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction +const meta: Meta = { + component: DividerLabel, + argTypes: {}, + parameters: { + design: { + type: 'figma', + url: '', + }, + }, +} + +type Story = StoryObj + +export const Default: Story = { + args: { + label: 'Messages', + }, +} + +export default meta diff --git a/packages/components/src/divider-label/divider-label.tsx b/packages/components/src/divider-label/divider-label.tsx new file mode 100644 index 00000000..7ad7c884 --- /dev/null +++ b/packages/components/src/divider-label/divider-label.tsx @@ -0,0 +1,29 @@ +import { Stack } from '@tamagui/core' + +import { Paragraph } from '../typography' + +type Props = { + label: string + tight?: boolean +} + +const DividerLabel = (props: Props) => { + const { label, tight = true } = props + + return ( + + + {label} + + + ) +} + +export { DividerLabel } +export type { Props as DividerLabelProps } diff --git a/packages/components/src/divider-label/index.tsx b/packages/components/src/divider-label/index.tsx new file mode 100644 index 00000000..051c7f33 --- /dev/null +++ b/packages/components/src/divider-label/index.tsx @@ -0,0 +1 @@ +export * from './divider-label'