-
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.
docs: headline docs and demo (#3192)
- Loading branch information
Showing
2 changed files
with
68 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,12 @@ | ||
import { Body, Headline, Text } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<Body> | ||
<Headline level="3">Awesome Headline!</Headline> | ||
<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. | ||
</Text> | ||
</Body> | ||
); |
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,56 @@ | ||
--- | ||
title: Headline | ||
group: Content | ||
caption: Component for headlines. | ||
--- | ||
|
||
The main task of the `<Headline>` component is to serve as a title of a content section. | ||
It should be used when you want to structure different parts of informations. That could be the page title, text headings or the title of different content parts. | ||
|
||
The component has a `level` property that allows you to select a number from 1-6. This is a feature for SEO optimization, so that a rendered `level="5"` can look like a HTML H2 element. | ||
|
||
Alternatively you can set this with the `size` prop. | ||
With the `size` prop you can style the different levels. | ||
|
||
## Usage | ||
|
||
### Import | ||
|
||
```tsx | ||
import { Headline } from '@marigold/components'; | ||
``` | ||
|
||
### Appearance | ||
|
||
<AppearanceTable component={title} /> | ||
|
||
### Props | ||
|
||
<PropsTable | ||
props={[ | ||
{ | ||
property: 'level', | ||
type: 'string', | ||
description: 'Set a different level from theme, values are from 1 - 6.', | ||
default: `1`, | ||
}, | ||
{ | ||
property: 'align', | ||
type: 'left | center | right', | ||
description: 'Set the align of the headline.', | ||
}, | ||
{ | ||
property: 'color', | ||
type: 'string', | ||
description: 'Set the color of the headline.', | ||
}, | ||
]} | ||
/> | ||
|
||
## Examples | ||
|
||
### Headline with Text | ||
|
||
In this example you see a simple headline with some text. | ||
|
||
<ComponentDemo file="./headline.demo.tsx" /> |
418cab9
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-docs – ./
marigold-docs.vercel.app
marigold-docs-marigold.vercel.app
marigold-docs-git-main-marigold.vercel.app
418cab9
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-storybook-git-main-marigold.vercel.app
marigold-storybook-marigold.vercel.app
marigold-latest.vercel.app