DocSpace-buildtools/web/ASC.Web.Storybook/stories/text/headline/README.md

48 lines
1.8 KiB
Markdown
Raw Normal View History

2019-07-02 11:22:48 +00:00
# Text
## Usage
```js
import { Text } from 'asc-web-components';
```
### <Text.Headline>
2019-08-06 14:31:52 +00:00
A component that renders headline
2019-07-02 11:22:48 +00:00
#### Usage
```js
2019-08-06 14:31:52 +00:00
<Text.Headline as='h1' title='Some title'>
2019-07-02 11:22:48 +00:00
Some text
</Text.Headline>
```
##### If you need to override styles add forwardedAs instead of as
2019-08-06 14:31:52 +00:00
```js
const StyledHeadline = styled(Text.Headline)`
2019-08-06 14:31:52 +00:00
&:hover{
border-bottom: 1px dotted;
}
`;
<StyledHeadline forwardedAs='h4' title='Some title'>
2019-08-06 14:31:52 +00:00
Some text
</StyledHeadline>
```
2019-07-02 11:22:48 +00:00
#### Properties
| Props | Type | Required | Values | Default | Description |
| ------------------ | -------- | :------: | --------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `color` | `string` | - | - | '#333333' | Specifies the headline color |
2019-08-06 14:31:52 +00:00
| `as ` | `string` | - | - | `h1` | Sets the tag through which to render the component |
2019-07-02 11:22:48 +00:00
| `title` | `bool` | - | - | - | Title |
| `truncate` | `bool` | - | - | false | Disables word wrapping |
| `isInline` | `bool` | - | - | false | Sets the 'display: inline-block' property |
2019-08-06 14:31:52 +00:00
| `size` | `oneOF` | - | `big`, `medium`, `small` | `big` | Sets the size of headline |
2019-07-02 11:22:48 +00:00