Merge branch 'master' of https://github.com/ONLYOFFICE/CommunityServer-AspNetCore
This commit is contained in:
commit
e13b1e461b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-components",
|
||||
"version": "1.0.219",
|
||||
"version": "1.0.220",
|
||||
"description": "Ascensio System SIA component library",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "dist/asc-web-components.js",
|
||||
|
@ -34,7 +34,7 @@ const StyledText = styled(Text)`
|
||||
|
||||
| Props | Type | Required | Values | Default | Description |
|
||||
| ----------------- | :------: | :------: | :----: | :-------: | -------------------------------------------------- |
|
||||
| `fontSize` | `number` | - | - | `13` | Sets the font size |
|
||||
| `fontSize` | `oneOfType(number, string)` | - | - | `13` | Sets the font size |
|
||||
| `as` | `string` | - | - | `p` | Sets the tag through which to render the component |
|
||||
| `title` | `bool` | - | - | - | Title |
|
||||
| `truncate` | `bool` | - | - | `false` | Disables word wrapping |
|
||||
|
@ -4,7 +4,8 @@ import styled, { css } from 'styled-components';
|
||||
import commonTextStyles from './common-text-styles';
|
||||
|
||||
const styleCss = css`
|
||||
font-size: ${props => props.fontSize}px;
|
||||
${props => (typeof (props.fontSize) === 'string' && css`font-size: ${props.fontSize};`) ||
|
||||
(typeof (props.fontSize) === 'number' && css`font-size: ${props.fontSize}px;`)};
|
||||
font-weight: ${props => props.fontWeight
|
||||
? props.fontWeight
|
||||
: props.isBold == true ? 700 : 500};
|
||||
@ -33,7 +34,7 @@ Text.propTypes = {
|
||||
tag: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
color: PropTypes.string,
|
||||
fontSize: PropTypes.number,
|
||||
fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
fontWeight: PropTypes.number,
|
||||
backgroundColor: PropTypes.string,
|
||||
truncate: PropTypes.bool,
|
||||
|
Loading…
Reference in New Issue
Block a user