-
Notifications
You must be signed in to change notification settings - Fork 162
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
106 additions
and
14 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,77 @@ | ||
# Section Header | ||
|
||
Component for displaying a section header. Useful if your landing page has multiple sections. | ||
|
||
## Usage | ||
|
||
::code-group | ||
::code-preview{label="Preview" column} | ||
::section-header{title="What's included" subtitle="Features" description="Docus is packed with features to help you build your next project."} | ||
:: | ||
:: | ||
```md [MDC] | ||
::section-header{title="What's included" subtitle="Features" description="Docus is packed with features to help you build your next project."} | ||
:: | ||
``` | ||
:: | ||
|
||
## Props | ||
|
||
| Prop | Type | Default | Description | | ||
|--|--|--|--| | ||
| `title` | `String` | `''` | Title of the section. Use `title` slot as alternative | | ||
| `subtitle` | `String` | `''` | Subtitle of the section. Use `subtitle` slot as alternative | | ||
| `subtitleColor` | `String` | `{color.primary.500}` | Subtitle color | | ||
| `description` | `String` | `''` | Description of the section. Use `description` slot as alternative | | ||
|
||
## Slots | ||
|
||
| Slot | Description | | ||
|--|--| | ||
| `subtitle` | Subtitle of the section. Use `subtitle` prop as alternative | | ||
| `title` | Title of the section. Use `title` prop as alternative | | ||
| `description` | Description of the section. Use `description` prop as alternative | | ||
|
||
## Design Tokens | ||
|
||
```ts [tokens.config.ts] | ||
import { defineTheme } from 'pinceau' | ||
|
||
export default defineTheme({ | ||
docus: { | ||
landing: { | ||
sectionHeader: { | ||
alignItems: { | ||
initial: 'center', | ||
xl: 'flex-start' | ||
}, | ||
marginBottom: '{space.8}', | ||
subtitle: { | ||
fontSize: '{text.lg.fontSize}', | ||
lineHeight: '{text.lg.lineHeight}', | ||
fontWeight: '{fontWeight.normal}', | ||
letterSpacing: '{letterSpacing.wide}', | ||
marginBottom: '{space.2}' | ||
}, | ||
title: { | ||
fontSize: { | ||
initial: '{text.3xl.fontSize}', | ||
sm: '{text.4xl.fontSize}' | ||
}, | ||
lineHeight: { | ||
initial: '{text.3xl.lineHeight}', | ||
sm: '{text.4xl.lineHeight}' | ||
}, | ||
marginBottom: '{space.2}', | ||
fontWeight: '{fontWeight.semibold}', | ||
letterSpacing: '{letterSpacing.tight}', | ||
color: '{docus.body.color}' | ||
}, | ||
description: { | ||
color: '{elements.text.secondary.color.static}' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
``` |
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