ASC.Web.Components: link: fontWeight prop added

This commit is contained in:
Andrey Savihin 2019-12-24 09:51:46 +03:00
parent c293eaa3c0
commit e076fd3e82
3 changed files with 6 additions and 3 deletions

View File

@ -28,17 +28,18 @@ import { Link } from "asc-web-components";
| ------------------- | :------------: | :------: | :--------------------------------------: | :-------------------: | ---------------------------------------------------------------------------------------------- |
| `className` | `string` | - | - | - | Accepts class |
| `color` | `string` | - | - | `#333333` | Color of link |
| `fontSize` | `string` | - | - | `13px` | Font size of link |
| `fontSize` | `string` | - | - | `13px` | Font size of link |
| `fontWeight` |`number, string`| - | - | - | Font weight of link |
| `href` | `string` | - | - | `undefined` | Used as HTML `href` property |
| `id` | `string` | - | - | - | Accepts id |
| `isBold` | `bool` | - | - | `false` | Set font weight |
| `isHovered` | `bool` | - | - | `false` | Set hovered state and effects of link. |
| `isSemitransparent` | `bool` | - | - | `false` | Set css-property 'opacity' to 0.5. Usually apply for users with "pending" status | |
| `isSemitransparent` | `bool` | - | - | `false` | Set css-property 'opacity' to 0.5. Usually apply for users with "pending" status |
| `isTextOverflow` | `bool` | - | - | `true` | Activate or deactivate _text-overflow_ CSS property with ellipsis (' … ') value |
| `onClick` | `func` | - | - | - | What the link will trigger when clicked. Only for \'action\' type of link |
| `rel` | `string` | - | - | `noopener noreferrer` | Used as HTML `rel` property |
| `style` | `obj`, `array` | - | - | - | Accepts css style |
| `tabIndex` | `number` | - | - | `-1` | Used as HTML `tabindex` property |
| `target` | `oneOf` | - | `\_blank`, `\_self`, `\_parent`, `\_top` | - | The _target_ attribute specifies where the linked document will open when the link is clicked. | |
| `target` | `oneOf` | - | `\_blank`, `\_self`, `\_parent`, `\_top` | - | The _target_ attribute specifies where the linked document will open when the link is clicked. |
| `title` | `string` | - | - | - | Used as HTML `title` property |
| `type` | `oneOf` | - | `action`, `page` | `page` | Type of link |

View File

@ -54,6 +54,7 @@ const Link = memo(({ isTextOverflow, children, ...rest }) => {
Link.propTypes = {
color: PropTypes.string,
fontSize: PropTypes.string,
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
href: PropTypes.string,
isBold: PropTypes.bool,
isHovered: PropTypes.bool,

View File

@ -34,6 +34,7 @@ storiesOf('Components|Link', module)
type={select('type', type, 'page')}
color={color('color', '#333333')}
fontSize={text('fontSize', '13px')}
fontWeight={text('fontWeight', '700')}
isBold={boolean('isBold', false)}
title={text('title', undefined)}
target={select('target', target, '_blank')}