From ca8e4c6c1d191cfbb65c4b758f16bd51a045a57b Mon Sep 17 00:00:00 2001 From: katzoo Date: Mon, 19 Dec 2016 20:39:07 +0100 Subject: [PATCH] fix few missing propTypes --- components/app_bar/AppBar.js | 1 + components/app_bar/readme.md | 1 + components/autocomplete/readme.md | 1 + components/button/readme.md | 1 + components/card/readme.md | 2 +- components/checkbox/readme.md | 1 + components/date_picker/readme.md | 6 +++++- components/layout/NavDrawer.js | 2 ++ components/list/ListItemContent.js | 7 +++++-- components/snackbar/Snackbar.js | 1 - components/tabs/Tab.js | 4 +++- components/tabs/Tabs.js | 4 ++++ 12 files changed, 25 insertions(+), 6 deletions(-) diff --git a/components/app_bar/AppBar.js b/components/app_bar/AppBar.js index 00913f70..60da12b9 100644 --- a/components/app_bar/AppBar.js +++ b/components/app_bar/AppBar.js @@ -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 diff --git a/components/app_bar/readme.md b/components/app_bar/readme.md index 8eae071d..f68ecf12 100644 --- a/components/app_bar/readme.md +++ b/components/app_bar/readme.md @@ -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 diff --git a/components/autocomplete/readme.md b/components/autocomplete/readme.md index 2812be86..2b7b8a3a 100644 --- a/components/autocomplete/readme.md +++ b/components/autocomplete/readme.md @@ -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. | diff --git a/components/button/readme.md b/components/button/readme.md index 9bbe4ac3..e53de77c 100644 --- a/components/button/readme.md +++ b/components/button/readme.md @@ -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. diff --git a/components/card/readme.md b/components/card/readme.md index 897a2215..292d8a49 100644 --- a/components/card/readme.md +++ b/components/card/readme.md @@ -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 `` 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. | diff --git a/components/checkbox/readme.md b/components/checkbox/readme.md index b14af09e..5f7e21f6 100644 --- a/components/checkbox/readme.md +++ b/components/checkbox/readme.md @@ -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.| diff --git a/components/date_picker/readme.md b/components/date_picker/readme.md index 8410f60d..b9db41f3 100644 --- a/components/date_picker/readme.md +++ b/components/date_picker/readme.md @@ -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)). | diff --git a/components/layout/NavDrawer.js b/components/layout/NavDrawer.js index f484bc51..631ea5e3 100644 --- a/components/layout/NavDrawer.js +++ b/components/layout/NavDrawer.js @@ -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, diff --git a/components/list/ListItemContent.js b/components/list/ListItemContent.js index d7fe630e..c02438ed 100644 --- a/components/list/ListItemContent.js +++ b/components/list/ListItemContent.js @@ -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 ( diff --git a/components/snackbar/Snackbar.js b/components/snackbar/Snackbar.js index 2f637487..399a8118 100644 --- a/components/snackbar/Snackbar.js +++ b/components/snackbar/Snackbar.js @@ -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 diff --git a/components/tabs/Tab.js b/components/tabs/Tab.js index 13e9f0de..0fe77318 100644 --- a/components/tabs/Tab.js +++ b/components/tabs/Tab.js @@ -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 }) }; diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js index 94782d3d..359905b3 100644 --- a/components/tabs/Tabs.js +++ b/components/tabs/Tabs.js @@ -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 })