Open andria-dev opened 5 years ago
The docs for <IconButton> are clearly not the correct docs, they show an example for <IconToggle>:
<IconButton>
<IconToggle>
import {h, Component} from 'preact'; import IconToggle from 'preact-material-components/IconToggle'; import 'preact-material-components/IconToggle/style.css'; export default class IconTogglePage extends Component { render(){ const toggleOnIcon = { content: "favorite", label: "Remove From Favorites" }; const toggleOffIcon = { content: "favorite_border", label: "Add to Favorites" }; return ( <div> <IconButton> <IconButton.Icon on>favorite</IconButton.Icon> <IconButton.Icon>favorite_border</IconButton.Icon> </IconButton> </div> ); } }
This section should be renamed "IconToggle" and there should be a separate section for "IconButton".
Yes the docs are not totally up to date, they were forked from icon toggle, so there may be elements that are not renamed yet.
The docs for
<IconButton>
are clearly not the correct docs, they show an example for<IconToggle>
:This section should be renamed "IconToggle" and there should be a separate section for "IconButton".