Skip to content

Commit

Permalink
[docs] Improve coverage (#7432)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Jul 14, 2017
1 parent b610e5e commit 2400b10
Show file tree
Hide file tree
Showing 43 changed files with 93 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
|:-----|:-----|:--------|:------------|
| <span style="color: #31a148">children *</span> | node | | The content of the component. |
| classes | object | | Useful to extend the style applied to components. |
| onChange | function | | Function called when the value changes.<br><br>**Signature:**<br>`function(event: event, value: string) => void`<br>*event:* The event that triggered the change<br>*value:* We default to the index of the child |
| onChange | function | | Callback fired when the value changes.<br><br>**Signature:**<br>`function(event: object, value: any) => void`<br>*event:* The event source of the callback<br>*value:* We default to the index of the child |
| showLabels | bool | false | If `true`, all `BottomNavigationButton`s will show their labels. By default only the selected `BottomNavigationButton` will show its label. |
| value | number | | The value of the currently selected `BottomNavigationButton`. |
| value | any | | The value of the currently selected `BottomNavigationButton`. |

Any other properties supplied will be spread to the root element.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Checkbox/Checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
| inputProps | object | | Properties applied to the `input` element. |
| inputRef | function | | Use that property to pass a ref callback to the native input component. |
| name | string | | |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* `change` event<br>*checked:* The `checked` value of the switch |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback<br>*checked:* The `checked` value of the switch |
| value | string | | The value of the component. |

Any other properties supplied will be spread to the root element.
Expand Down
16 changes: 0 additions & 16 deletions docs/src/pages/component-api/Checkbox/LabelCheckbox.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Chip/Chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Chips represent complex entities in small blocks, such as a contact.
| avatar | node | | Avatar element. |
| classes | object | | Useful to extend the style applied to components. |
| label | node | | The content of the label. |
| onRequestDelete | function | | Callback function fired when the delete icon is clicked. If set, the delete icon will be shown.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* `onClick` event targeting the delete icon element. |
| onRequestDelete | function | | Callback function fired when the delete icon is clicked. If set, the delete icon will be shown.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |

Any other properties supplied will be spread to the root element.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Dialog/Dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Dialogs are overlaid modal paper based components with a backdrop.
| onExit | TransitionCallback | | Callback fired before the dialog exits. |
| onExited | TransitionCallback | | Callback fired when the dialog has exited. |
| onExiting | TransitionCallback | | Callback fired when the dialog is exiting. |
| onRequestClose | Function | | Callback fired when the dialog requests to be closed. |
| onRequestClose | Function | | Callback fired when the component requests to be closed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
| open | boolean | false | If `true`, the Dialog is open. |
| transition | union:&nbsp;Function<br>&nbsp;Element<*><br> | Fade | Transition component. |

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Drawer/Drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| elevation | number | 16 | The elevation of the drawer. |
| enterTransitionDuration | number | duration.enteringScreen | Customizes duration of enter animation (ms) |
| leaveTransitionDuration | number | duration.leavingScreen | Customizes duration of leave animation (ms) |
| onRequestClose | Function | | Callback fired when the internal modal requests to be closed. |
| onRequestClose | Function | | Callback fired when the component requests to be closed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
| open | boolean | false | If `true`, the drawer is open. |

Any other properties supplied will be spread to the root element.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Form/FormControlLabel.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| inputRef | function | | Use that property to pass a ref callback to the native input component. |
| <span style="color: #31a148">label *</span> | node | | The text to be used in an enclosing label element. |
| name | string | | |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* `change` event<br>*checked:* The `checked` value of the switch |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback<br>*checked:* The `checked` value of the switch |
| value | string | | The value of the component. |

Any other properties supplied will be spread to the root element.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Menu/Menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| onExit | TransitionCallback | | Callback fired before the Menu exits. |
| onExited | TransitionCallback | | Callback fired when the Menu has exited. |
| onExiting | TransitionCallback | | Callback fired when the Menu is exiting. |
| onRequestClose | Function | | Callback function fired when the menu is requested to be closed. |
| onRequestClose | Function | | Callback fired when the component requests to be closed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
| open | boolean | false | If `true`, the menu is visible. |
| transitionDuration | union:&nbsp;number<br>&nbsp;'auto'<br> | 'auto' | The length of the transition in `ms`, or 'auto' |

Expand Down
16 changes: 0 additions & 16 deletions docs/src/pages/component-api/Radio/LabelRadio.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Radio/Radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| inputProps | object | | Properties applied to the `input` element. |
| inputRef | function | | Use that property to pass a ref callback to the native input component. |
| name | string | | |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* `change` event<br>*checked:* The `checked` value of the switch |
| onChange | function | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback<br>*checked:* The `checked` value of the switch |
| value | string | | The value of the component. |

Any other properties supplied will be spread to the root element.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Radio/RadioGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| children | node | | The content of the component. |
| classes | object | | Useful to extend the style applied to components. |
| name | string | | The name used to reference the value of the control. |
| onChange | function | | Callback fired when a radio button is selected.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* `change` event<br>*checked:* The `checked` value of the switch |
| onChange | function | | Callback fired when a radio button is selected.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback<br>*checked:* The `checked` value of the switch |
| selectedValue | string | | Value of the selected radio button |

Any other properties supplied will be spread to the root element.
Expand Down
33 changes: 0 additions & 33 deletions docs/src/pages/component-api/Ripple/Ripple.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/src/pages/component-api/Ripple/TouchRipple.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Snackbar/Snackbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| onExit | TransitionCallback | | Callback fired before the transition is exiting. |
| onExited | TransitionCallback | | Callback fired when the transition has exited. |
| onExiting | TransitionCallback | | Callback fired when the transition is exiting. |
| onRequestClose | signature | | Callback fired when the component requests to be closed.<br>Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` `open` prop.<br>The `reason` parameter can optionally be used to control the response to `onRequestClose`, for example ignoring `clickaway`. |
| onRequestClose | signature | | Callback fired when the component requests to be closed.<br>Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` `open` prop.<br>The `reason` parameter can optionally be used to control the response to `onRequestClose`, for example ignoring `clickaway`.<br><br>**Signature:**<br>`function(event: object, reason: string) => void`<br>*event:* The event source of the callback<br>*reason:* Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"` |
| <span style="color: #31a148">open *</span> | boolean | | If true, `Snackbar` is open. |
| transition | union:&nbsp;Function<br>&nbsp;Element<*><br> | | Object with Transition component, props & create Fn. |

Expand Down
16 changes: 0 additions & 16 deletions docs/src/pages/component-api/Switch/LabelSwitch.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Switch/Switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| icon | node | | The icon to display when the component is unchecked. If a string is provided, it will be used as a font ligature. |
| inputProps | object | | Properties applied to the `input` element. |
| name | string | | |
| onChange | function | | Callback fired when the is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* `change` event<br>*checked:* The `checked` value of the switch |
| onChange | function | | Callback fired when the is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback<br>*checked:* The `checked` value of the switch |
| value | string | | The value of the component. |

Any other properties supplied will be spread to the root element.
Expand Down
27 changes: 0 additions & 27 deletions docs/src/pages/component-api/Tabs/TabIndicator.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/src/pages/component-api/Tabs/TabScrollButton.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Tabs/Tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Notice that this Component is incompatible with server side rendering.
| <span style="color: #31a148">index *</span> | union:&nbsp;[object Object]<br>&nbsp;number<br> | | The index of the currently selected `Tab`. If you don't want any selected `Tab`, you can set this property to `false`. |
| indicatorClassName | string | | The CSS class name of the indicator element. |
| indicatorColor | union:&nbsp;[object Object],[object Object]<br>&nbsp;string<br> | 'accent' | Determines the color of the indicator. |
| <span style="color: #31a148">onChange *</span> | function | | Function called when the index change. |
| <span style="color: #31a148">onChange *</span> | function | | Callback fired when the index changes.<br><br>**Signature:**<br>`function(event: object, index: number) => void`<br>*event:* The event source of the callback<br>*index:* We default to the index of the child |
| scrollButtons | enum:&nbsp;'auto'<br>&nbsp;'on'<br>&nbsp;'off'<br> | 'auto' | Determine behavior of scroll buttons when tabs are set to scroll `auto` will only present them on medium and larger viewports `on` will always present them `off` will never present them |
| scrollable | bool | false | True invokes scrolling properties and allow for horizontally scrolling (or swiping) the tab bar. |
| textColor | union:&nbsp;[object Object],[object Object],[object Object]<br>&nbsp;string<br> | 'inherit' | Determines the color of the `Tab`. |
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
"build:copy-files": "babel-node ./scripts/copy-files.js",
"build:umd:dev": "webpack --config scripts/umd.webpack.config.js",
"build:umd:prod": "cross-env NODE_ENV=production webpack --config scripts/umd.webpack.config.js",
"build:docs": "babel-node ./scripts/build-api-docs.js",
"build:docs": "rimraf docs/src/pages/component-api/* && babel-node ./scripts/build-api-docs.js",
"prettier": "find . -name \"*.js\" | grep -v -f .eslintignore | xargs prettier --write --single-quote --trailing-comma all --print-width 100",
"clean:docs": "rimraf docs/api/*",
"clean:build": "rimraf build",
"lint": "eslint . --cache && echo \"eslint: no lint errors\"",
"prebuild": "npm run clean:build",
Expand Down
Loading

0 comments on commit 2400b10

Please sign in to comment.