-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add paragraph component * export paragraph * text as td * change tag to p
- Loading branch information
Showing
6 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@saleor/macaw-ui": patch | ||
--- | ||
|
||
Macaw-ui now exports new Paragraph component that is Text displayed as block. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { Paragraph } from "./index"; | ||
|
||
const meta: Meta<typeof Paragraph> = { | ||
title: "Components / Paragraph", | ||
tags: ["autodocs"], | ||
component: Paragraph, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Paragraph>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
size: 4, | ||
children: "Some text displayed as block.", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { forwardRef } from "react"; | ||
import { TextProps, Text } from "../Text"; | ||
|
||
export const Paragraph = forwardRef<HTMLSpanElement, TextProps>( | ||
({ ...rest }, ref) => { | ||
return <Text ref={ref} display="block" as="p" {...rest} />; | ||
} | ||
); | ||
|
||
Paragraph.displayName = "Paragraph"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./Paragraph"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters