fix few missing propTypes
parent
d7659131fc
commit
ca8e4c6c1d
|
@ -28,6 +28,7 @@ const factory = (IconButton) => {
|
||||||
flat: PropTypes.string,
|
flat: PropTypes.string,
|
||||||
leftIcon: PropTypes.string,
|
leftIcon: PropTypes.string,
|
||||||
rightIcon: PropTypes.string,
|
rightIcon: PropTypes.string,
|
||||||
|
scrollHide: PropTypes.string,
|
||||||
title: PropTypes.string
|
title: PropTypes.string
|
||||||
}),
|
}),
|
||||||
title: PropTypes.string
|
title: PropTypes.string
|
||||||
|
|
|
@ -41,6 +41,7 @@ The `AppBar` component provides properties for the common use cases of `title`,
|
||||||
| `onLeftIconClick` | `Function` | `null` | Called on left icon click event.|
|
| `onLeftIconClick` | `Function` | `null` | Called on left icon click event.|
|
||||||
| `rightIcon` | `String|Element` | `null` | Right icon.|
|
| `rightIcon` | `String|Element` | `null` | Right icon.|
|
||||||
| `onRightIconClick` | `Function` | `null` | Called on right icon click event.|
|
| `onRightIconClick` | `Function` | `null` | Called on right icon click event.|
|
||||||
|
| `scrollHide` | `Bool` | `false` | Whether AppBar should be hidden during scroll.|
|
||||||
|
|
||||||
## Theme
|
## Theme
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ If you want to provide a theme via context, the component key is `RTAutocomplete
|
||||||
| `direction` | `String` | `auto` | Determines the opening direction. It can be `auto`, `top` or `down`. |
|
| `direction` | `String` | `auto` | Determines the opening direction. It can be `auto`, `top` or `down`. |
|
||||||
| `disabled` | `Bool` | `false` | If true, component will be disabled. |
|
| `disabled` | `Bool` | `false` | If true, component will be disabled. |
|
||||||
| `error` | `String` or `Node` | | Sets the error string for the internal input element. |
|
| `error` | `String` or `Node` | | Sets the error string for the internal input element. |
|
||||||
|
| `keepFocusOnChange` | `Bool` | `false` | Whether component should keep focus after value change. |
|
||||||
| `label` | `String` or `Node` | | The text string to use for the floating label element. |
|
| `label` | `String` or `Node` | | The text string to use for the floating label element. |
|
||||||
| `multiple` | `Bool` | `true` | If true, component can hold multiple values. |
|
| `multiple` | `Bool` | `true` | If true, component can hold multiple values. |
|
||||||
| `onBlur` | `Function` | | Callback function that is fired when component is blurred. |
|
| `onBlur` | `Function` | | Callback function that is fired when component is blurred. |
|
||||||
|
|
|
@ -54,6 +54,7 @@ If you want to provide a theme via context, the component key is `RTButton`.
|
||||||
| `raised` | `Boolean` | `false` | If true, the button will have a raised look. |
|
| `raised` | `Boolean` | `false` | If true, the button will have a raised look. |
|
||||||
| `ripple` | `Boolean` | `true` | If true, component will have a ripple effect on click.|
|
| `ripple` | `Boolean` | `true` | If true, component will have a ripple effect on click.|
|
||||||
| `theme` | `Object` | | Theme object will classnames that will be used to style the component.|
|
| `theme` | `Object` | | Theme object will classnames that will be used to style the component.|
|
||||||
|
| `type` | `String` | `button` | Component root container type.|
|
||||||
|
|
||||||
By default it will have neutral colors and a flat aspect even though the `flat` property is `false` by default. Also, some properties exclude others, for example a button cannot be `flat` and `raised` at the same time.
|
By default it will have neutral colors and a flat aspect even though the `flat` property is `false` by default. Also, some properties exclude others, for example a button cannot be `flat` and `raised` at the same time.
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ Used for displaying media such as images or videos on a card. Can also be used w
|
||||||
| `aspectRatio` | `enum`(`'wide'`,`'square'`) | | Forces a 16:9 or 1:1 aspect ratio respectively. Unset, the media area will have a flexible height. |
|
| `aspectRatio` | `enum`(`'wide'`,`'square'`) | | Forces a 16:9 or 1:1 aspect ratio respectively. Unset, the media area will have a flexible height. |
|
||||||
| `children` | `Any` | | Usually an image/video element or a `<CardTitle>` component. |
|
| `children` | `Any` | | Usually an image/video element or a `<CardTitle>` component. |
|
||||||
| `className` | `String` | | Additional class(es) for custom styling. |
|
| `className` | `String` | | Additional class(es) for custom styling. |
|
||||||
| `color` | `String` | | Sets the background color |
|
| `color` | `String` | | Sets the background color. |
|
||||||
| `contentOverlay` | `Boolean` | | Creates a dark overlay underneath the child components. |
|
| `contentOverlay` | `Boolean` | | Creates a dark overlay underneath the child components. |
|
||||||
| `image` | `String`, `Element` | | Can be used instead of children. Accepts an element or a URL string. |
|
| `image` | `String`, `Element` | | Can be used instead of children. Accepts an element or a URL string. |
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ If you want to provide a theme via context, the component key is `RTCheckbox`.
|
||||||
| Name | Type | Default | Description|
|
| Name | Type | Default | Description|
|
||||||
|:-----|:-----|:-----|:-----|
|
|:-----|:-----|:-----|:-----|
|
||||||
| `checked` | `Boolean` | `false` | Value for the checkbox, can be `true` or `false`. |
|
| `checked` | `Boolean` | `false` | Value for the checkbox, can be `true` or `false`. |
|
||||||
|
| `children` | `String`, `Element` or `Array` | | Children to pass through the component. |
|
||||||
| `className` | `String` | `''` | Sets a class to give customized styles to the checkbox field.|
|
| `className` | `String` | `''` | Sets a class to give customized styles to the checkbox field.|
|
||||||
| `disabled` | `Boolean` | `false` | If true, the checkbox shown as disabled and cannot be modified.|
|
| `disabled` | `Boolean` | `false` | If true, the checkbox shown as disabled and cannot be modified.|
|
||||||
| `label` | `String` of `node` | | Text label to attach next to the checkbox element.|
|
| `label` | `String` of `node` | | Text label to attach next to the checkbox element.|
|
||||||
|
|
|
@ -48,17 +48,21 @@ If you want to provide a theme via context, the component key is `RTDatePicker`.
|
||||||
|:-----|:-----|:-----|:-----|
|
|:-----|:-----|:-----|:-----|
|
||||||
| `active` | `Boolean` | `false` | Allows to control if the picker should be shown from outside. Beware you should update the prop when the Dialog is closed. |
|
| `active` | `Boolean` | `false` | Allows to control if the picker should be shown from outside. Beware you should update the prop when the Dialog is closed. |
|
||||||
| `autoOk` | `Boolean` | `false` | Automatically selects a date upon clicking on a day. |
|
| `autoOk` | `Boolean` | `false` | Automatically selects a date upon clicking on a day. |
|
||||||
|
| `cancelLabel` | `String` | `'Cancel'` | Label used for cancel button on date picker dialog. |
|
||||||
| `className` | `String` | | This class will be placed at the top of the `DatePickerDialog` component so you can provide custom styles.|
|
| `className` | `String` | | This class will be placed at the top of the `DatePickerDialog` component so you can provide custom styles.|
|
||||||
| `disabledDates` | `Array` | | An array of date objects which will be disabled in the calendar. All other dates will be enabled.|
|
| `disabledDates` | `Array` | | An array of date objects which will be disabled in the calendar. All other dates will be enabled.|
|
||||||
| `enabledDates` | `Array` | | An array of date objects which will be enabled in the calendar. All other dates will be disabled.|
|
| `enabledDates` | `Array` | | An array of date objects which will be enabled in the calendar. All other dates will be disabled.|
|
||||||
| `inputClassName`| `String` | | This class will be applied to `Input` component of `DatePicker`. |
|
| `inputClassName`| `String` | | This class will be applied to `Input` component of `DatePicker`. |
|
||||||
| `inputFormat` | `Function` | | Function to format the date displayed on the input. |
|
| `inputFormat` | `Function` | | Function to format the date displayed on the input. |
|
||||||
| `label` | `String` | | The text string to use for the floating label element in the input component.|
|
| `label` | `String` | | The text string to use for the floating label element in the input component.|
|
||||||
| `locale` | `String` or `Object` | `'en'` | Set the locale for the date picker dialog ('de','en','es','af','ar','be','bg','bn','bo','br','bs','ca','gl','eu','pt','it',fr'). Object is supported too (see example above). |
|
| `locale` | `String` or `Object` | `'en'` | Set the locale for the date picker dialog ('de','no','en','es','af','ar','be','bg','bn','bo','br','bs','ca','gl','eu','pt','it','fr','ru','ua'). Object is supported too (see example above). |
|
||||||
| `maxDate` | `Date` | | Date object with the maximum selectable date. |
|
| `maxDate` | `Date` | | Date object with the maximum selectable date. |
|
||||||
| `minDate` | `Date` | | Date object with the minimum selectable date. |
|
| `minDate` | `Date` | | Date object with the minimum selectable date. |
|
||||||
| `onChange` | `Function` | | Callback called when the picker value is changed.|
|
| `onChange` | `Function` | | Callback called when the picker value is changed.|
|
||||||
|
| `onClick` | `Function` | | Callback fired on Input click.|
|
||||||
|
| `onDismiss` | `Function` | | Callback fired after dismissing the Dialog.|
|
||||||
| `onEscKeyDown` | `Function` | | Callback called when the ESC key is pressed with the overlay active. |
|
| `onEscKeyDown` | `Function` | | Callback called when the ESC key is pressed with the overlay active. |
|
||||||
|
| `onKeyPress` | `Function` | | Callback invoked on Input key press.
|
||||||
| `onOverlayClick`| `Function` | | Callback to be invoked when the dialog overlay is clicked.|
|
| `onOverlayClick`| `Function` | | Callback to be invoked when the dialog overlay is clicked.|
|
||||||
| `readonly` | `Boolean` | | The input element will be readonly and look like disabled.|
|
| `readonly` | `Boolean` | | The input element will be readonly and look like disabled.|
|
||||||
| `sundayFirstDayOfWeek` | `Boolean`| `false` | Set week's first day to Sunday. Default week's first day is Monday ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Week_dates)). |
|
| `sundayFirstDayOfWeek` | `Boolean`| `false` | Set week's first day to Sunday. Default week's first day is Monday ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Week_dates)). |
|
||||||
|
|
|
@ -37,12 +37,14 @@ NavDrawer.propTypes = {
|
||||||
active: PropTypes.string,
|
active: PropTypes.string,
|
||||||
drawerContent: PropTypes.string,
|
drawerContent: PropTypes.string,
|
||||||
lgPermanent: PropTypes.string,
|
lgPermanent: PropTypes.string,
|
||||||
|
lgTabletPermanent: PropTypes.string,
|
||||||
mdPermanent: PropTypes.string,
|
mdPermanent: PropTypes.string,
|
||||||
navDrawer: PropTypes.string,
|
navDrawer: PropTypes.string,
|
||||||
pinned: PropTypes.string,
|
pinned: PropTypes.string,
|
||||||
scrim: PropTypes.string,
|
scrim: PropTypes.string,
|
||||||
scrollY: PropTypes.string,
|
scrollY: PropTypes.string,
|
||||||
smPermanent: PropTypes.string,
|
smPermanent: PropTypes.string,
|
||||||
|
smTabletPermanent: PropTypes.string,
|
||||||
wide: PropTypes.string,
|
wide: PropTypes.string,
|
||||||
xlPermanent: PropTypes.string,
|
xlPermanent: PropTypes.string,
|
||||||
xxlPermanent: PropTypes.string,
|
xxlPermanent: PropTypes.string,
|
||||||
|
|
|
@ -16,8 +16,10 @@ const factory = (ListItemText) => {
|
||||||
children: PropTypes.any,
|
children: PropTypes.any,
|
||||||
legend: PropTypes.string,
|
legend: PropTypes.string,
|
||||||
theme: PropTypes.shape({
|
theme: PropTypes.shape({
|
||||||
|
auto: PropTypes.string,
|
||||||
itemContentRoot: PropTypes.string,
|
itemContentRoot: PropTypes.string,
|
||||||
large: PropTypes.string
|
large: PropTypes.string,
|
||||||
|
normal: PropTypes.string
|
||||||
}),
|
}),
|
||||||
type: PropTypes.oneOf(types)
|
type: PropTypes.oneOf(types)
|
||||||
};
|
};
|
||||||
|
@ -34,8 +36,9 @@ const factory = (ListItemText) => {
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const {children, caption, legend, theme} = this.props;
|
const {children, caption, legend, theme} = this.props;
|
||||||
|
const contentType = this.getType();
|
||||||
const className = classnames(theme.itemContentRoot, {
|
const className = classnames(theme.itemContentRoot, {
|
||||||
[theme[this.getType()]]: theme[this.getType()]
|
[theme[contentType]]: theme[contentType]
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -24,7 +24,6 @@ const factory = (Overlay, Button) => {
|
||||||
active: PropTypes.string,
|
active: PropTypes.string,
|
||||||
button: PropTypes.string,
|
button: PropTypes.string,
|
||||||
cancel: PropTypes.string,
|
cancel: PropTypes.string,
|
||||||
icon: PropTypes.string,
|
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
snackbar: PropTypes.string,
|
snackbar: PropTypes.string,
|
||||||
warning: PropTypes.string
|
warning: PropTypes.string
|
||||||
|
|
|
@ -19,7 +19,9 @@ class Tab extends Component {
|
||||||
active: PropTypes.string,
|
active: PropTypes.string,
|
||||||
disabled: PropTypes.string,
|
disabled: PropTypes.string,
|
||||||
hidden: PropTypes.string,
|
hidden: PropTypes.string,
|
||||||
label: PropTypes.string
|
label: PropTypes.string,
|
||||||
|
withIcon: PropTypes.string,
|
||||||
|
withText: PropTypes.string
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,13 @@ const factory = (Tab, TabContent, FontIcon) => {
|
||||||
inverse: PropTypes.bool,
|
inverse: PropTypes.bool,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
theme: PropTypes.shape({
|
theme: PropTypes.shape({
|
||||||
|
arrow: PropTypes.string,
|
||||||
|
arrowContainer: PropTypes.string,
|
||||||
|
disableAnimation: PropTypes.string,
|
||||||
fixed: PropTypes.string,
|
fixed: PropTypes.string,
|
||||||
inverse: PropTypes.string,
|
inverse: PropTypes.string,
|
||||||
navigation: PropTypes.string,
|
navigation: PropTypes.string,
|
||||||
|
navigationContainer: PropTypes.string,
|
||||||
pointer: PropTypes.string,
|
pointer: PropTypes.string,
|
||||||
tabs: PropTypes.string
|
tabs: PropTypes.string
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue