ASC.Web.Components: radio-button-group: added fontSize, fontWeight props

This commit is contained in:
Andrey Savihin 2019-12-27 15:08:23 +03:00
parent 1513610fe5
commit beaaeb08ad
3 changed files with 8 additions and 0 deletions

View File

@ -35,3 +35,5 @@ import { RadioButtonGroup } from "asc-web-components";
| `spacing` | `string` | - | - | `15px` | Margin between radiobutton. If orientation `horizontal`, it is `margin-left`(apply for all radiobuttons, except first), if orientation `vertical`, it is `margin-bottom`(apply for all radiobuttons, except last) |
| `style` | `obj`, `array` | - | - | - | Accepts css style |
| `width` | `string` | - | - | `100%` | Width of RadioButtonGroup container |
| `fontSize` | `string` | - | - | - | Font size of link |
| `fontWeight` |`number, string`| - | - | - | Font weight of link |

View File

@ -61,6 +61,8 @@ class RadioButtonGroup extends React.Component {
isDisabled={this.props.isDisabled || option.disabled}
label={option.label}
fontSize={this.props.fontSize}
fontWeight={this.props.fontWeight}
spacing={this.props.spacing}
orientation={this.props.orientation}
/>
@ -89,6 +91,8 @@ RadioButtonGroup.propTypes = {
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
width: PropTypes.string,
fontSize: PropTypes.string,
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
}
RadioButtonGroup.defaultProps = {

View File

@ -54,6 +54,8 @@ storiesOf('Components|Input', module)
orientation={select('orientation', orientation, 'horizontal')}
width={text('width', '100%')}
isDisabled={boolean('isDisabled', false)}
fontSize={text('fontSize', '13px')}
fontWeight={text('fontWeight', '400')}
selected={values[0]}
spacing={text('spacing', '15px')}
name={text('name', 'group')}