Skip to content

Commit

Permalink
[docs] Updated Divider Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Nov 12, 2018
1 parent 3dedb39 commit 58b43d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/src/pages/demos/dividers/dividers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ You can save rendering this DOM element by using the `divider` property on the `

{{"demo": "pages/demos/dividers/ListDividers.js"}}

## Inset Dividers
## HTML5 Specification

The following example demonstrates the `inset` variant.
We need to make sure the `Divider` is rendered as a `li` to match the HTML5 specification.
The example shows two ways of achieving this.
The examples below show two ways of achieving this.

## Inset Dividers

The `inset` property has now been deprecated. You should now use `variant="inset"`

{{"demo": "pages/demos/dividers/InsetDividers.js"}}

Expand Down
2 changes: 2 additions & 0 deletions packages/material-ui/src/Divider/Divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ Divider.propTypes = {
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
/**
* If `true`, the divider will be indented.
* __WARNING__: `inset` is deprecated.
* Instead use `variant="inset"`.
*/
inset: chainPropTypes(PropTypes.bool, props => {
/* istanbul ignore if */
Expand Down
1 change: 1 addition & 0 deletions pages/api/divider.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import Divider from '@material-ui/core/Divider';
| <span class="prop-name">absolute</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | |
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> |   | Override or extend the styles applied to the component. See [CSS API](#css-api) below for more details. |
| <span class="prop-name">component</span> | <span class="prop-type">union:&nbsp;string&nbsp;&#124;<br>&nbsp;func&nbsp;&#124;<br>&nbsp;object<br></span> | <span class="prop-default">'hr'</span> | The component used for the root node. Either a string to use a DOM element or a component. |
| <span class="prop-name">inset</span> | <span class="prop-type">bool</span> |   | If `true`, the divider will be indented. __WARNING__: `inset` is deprecated. Instead use `variant="inset"`. |
| <span class="prop-name">light</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the divider will have a lighter color. |
| <span class="prop-name">subheader</span> | <span class="prop-type">string</span> |   | Divider subheader text. This will not work with `variant={'middle'}` |
| <span class="prop-name">variant</span> | <span class="prop-type">enum:&nbsp;'fullBleed'&nbsp;&#124;<br>&nbsp;'inset'&nbsp;&#124;<br>&nbsp;'middle'<br></span> | <span class="prop-default">'fullBleed'</span> | The variant to use. |
Expand Down

0 comments on commit 58b43d8

Please sign in to comment.