fix few missing propTypes

old
katzoo 2016-12-19 20:39:07 +01:00
parent d7659131fc
commit ca8e4c6c1d
12 changed files with 25 additions and 6 deletions

View File

@ -28,6 +28,7 @@ const factory = (IconButton) => {
flat: PropTypes.string,
leftIcon: PropTypes.string,
rightIcon: PropTypes.string,
scrollHide: PropTypes.string,
title: PropTypes.string
}),
title: PropTypes.string

View File

@ -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.|
| `rightIcon` | `String|Element` | `null` | Right icon.|
| `onRightIconClick` | `Function` | `null` | Called on right icon click event.|
| `scrollHide` | `Bool` | `false` | Whether AppBar should be hidden during scroll.|
## Theme

View File

@ -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`. |
| `disabled` | `Bool` | `false` | If true, component will be disabled. |
| `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. |
| `multiple` | `Bool` | `true` | If true, component can hold multiple values. |
| `onBlur` | `Function` | | Callback function that is fired when component is blurred. |

View File

@ -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. |
| `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.|
| `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.

View File

@ -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. |
| `children` | `Any` | | Usually an image/video element or a `<CardTitle>` component. |
| `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. |
| `image` | `String`, `Element` | | Can be used instead of children. Accepts an element or a URL string. |

View File

@ -44,6 +44,7 @@ If you want to provide a theme via context, the component key is `RTCheckbox`.
| Name | Type | Default | Description|
|:-----|:-----|:-----|:-----|
| `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.|
| `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.|

View File

@ -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. |
| `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.|
| `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.|
| `inputClassName`| `String` | | This class will be applied to `Input` component of `DatePicker`. |
| `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.|
| `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. |
| `minDate` | `Date` | | Date object with the minimum selectable date. |
| `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. |
| `onKeyPress` | `Function` | | Callback invoked on Input key press.
| `onOverlayClick`| `Function` | | Callback to be invoked when the dialog overlay is clicked.|
| `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)). |

View File

@ -37,12 +37,14 @@ NavDrawer.propTypes = {
active: PropTypes.string,
drawerContent: PropTypes.string,
lgPermanent: PropTypes.string,
lgTabletPermanent: PropTypes.string,
mdPermanent: PropTypes.string,
navDrawer: PropTypes.string,
pinned: PropTypes.string,
scrim: PropTypes.string,
scrollY: PropTypes.string,
smPermanent: PropTypes.string,
smTabletPermanent: PropTypes.string,
wide: PropTypes.string,
xlPermanent: PropTypes.string,
xxlPermanent: PropTypes.string,

View File

@ -16,8 +16,10 @@ const factory = (ListItemText) => {
children: PropTypes.any,
legend: PropTypes.string,
theme: PropTypes.shape({
auto: PropTypes.string,
itemContentRoot: PropTypes.string,
large: PropTypes.string
large: PropTypes.string,
normal: PropTypes.string
}),
type: PropTypes.oneOf(types)
};
@ -34,8 +36,9 @@ const factory = (ListItemText) => {
render () {
const {children, caption, legend, theme} = this.props;
const contentType = this.getType();
const className = classnames(theme.itemContentRoot, {
[theme[this.getType()]]: theme[this.getType()]
[theme[contentType]]: theme[contentType]
});
return (

View File

@ -24,7 +24,6 @@ const factory = (Overlay, Button) => {
active: PropTypes.string,
button: PropTypes.string,
cancel: PropTypes.string,
icon: PropTypes.string,
label: PropTypes.string,
snackbar: PropTypes.string,
warning: PropTypes.string

View File

@ -19,7 +19,9 @@ class Tab extends Component {
active: PropTypes.string,
disabled: PropTypes.string,
hidden: PropTypes.string,
label: PropTypes.string
label: PropTypes.string,
withIcon: PropTypes.string,
withText: PropTypes.string
})
};

View File

@ -18,9 +18,13 @@ const factory = (Tab, TabContent, FontIcon) => {
inverse: PropTypes.bool,
onChange: PropTypes.func,
theme: PropTypes.shape({
arrow: PropTypes.string,
arrowContainer: PropTypes.string,
disableAnimation: PropTypes.string,
fixed: PropTypes.string,
inverse: PropTypes.string,
navigation: PropTypes.string,
navigationContainer: PropTypes.string,
pointer: PropTypes.string,
tabs: PropTypes.string
})