-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 deletions.
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,3 @@ | ||
import { Text } from '@marigold/components'; | ||
|
||
export default () => <Text color="hotpink">Pink is awesome!</Text>; |
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,15 @@ | ||
import { Text } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<Text> | ||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy | ||
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam | ||
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet | ||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | ||
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam | ||
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed | ||
diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet | ||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | ||
amet. | ||
</Text> | ||
); |
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,80 @@ | ||
--- | ||
title: Text | ||
group: Content | ||
caption: Component for paragraphs. | ||
--- | ||
|
||
With the `<Text>` component you can easily add different HTML paragraph elements. It should be used when you want to write long text paragraphs. | ||
|
||
You can add properties like `align`, `color` or `fontSize` to the `<Text>`. You also have the opportunity to add sizes and custom variants to the component. | ||
|
||
## Usage | ||
|
||
### Import | ||
|
||
To import the component you just have to use this code below. | ||
|
||
```tsx | ||
import { Text } from '@marigold/components'; | ||
``` | ||
|
||
### AppearanceTable | ||
|
||
<AppearanceTable component={title} /> | ||
|
||
### Props | ||
|
||
<PropsTable | ||
props={[ | ||
{ | ||
property: 'align', | ||
type: '"left" | "cenetr" | "right"', | ||
description: 'Aligns the text.', | ||
default: 'none', | ||
}, | ||
{ | ||
property: 'color', | ||
type: 'string', | ||
description: 'Set the text color.', | ||
default: 'currentColor', | ||
}, | ||
{ | ||
property: 'cursor', | ||
type: 'string', | ||
description: 'Set the cursor for the text element.', | ||
default: 'text', | ||
}, | ||
{ | ||
property: 'fontSize', | ||
type: '"xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl"', | ||
description: 'Set the font size for the text element.', | ||
default: 'none', | ||
}, | ||
{ | ||
property: 'weight', | ||
type: '"thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "extrabold" | "black"', | ||
description: 'Set the font weight for the text element.', | ||
default: 'none', | ||
}, | ||
{ | ||
property: 'fontStyle', | ||
type: '"italic" | "normal"', | ||
description: 'Set the font style for the text element.', | ||
default: 'none', | ||
}, | ||
]} | ||
/> | ||
|
||
## Examples | ||
|
||
### Default paragraph Text | ||
|
||
Here you can see a typical text section. | ||
|
||
<ComponentDemo file="./text-default.demo.tsx" /> | ||
|
||
### Colored Text | ||
|
||
This `<Text>` element has the property `color` with it. | ||
|
||
<ComponentDemo file="./text-color.demo.tsx" /> |
405d82f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
marigold-storybook – ./
marigold-latest.vercel.app
marigold-storybook-git-main-marigold.vercel.app
marigold-storybook-marigold.vercel.app