Skip to content

Commit

Permalink
focus on the demos only
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 3, 2020
1 parent 356296b commit fa9e6b2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/components/badges/BadgeMax.tsx
Expand Up @@ -14,7 +14,7 @@ const useStyles = makeStyles((theme: Theme) =>
);

const defaultProps = {
color: 'secondary',
color: 'secondary' as 'secondary',
children: <MailIcon />,
};

Expand Down
4 changes: 0 additions & 4 deletions docs/src/pages/components/badges/ShowZeroBadge.tsx
Expand Up @@ -2,10 +2,6 @@ import React from 'react';
import { Theme, createStyles, makeStyles } from '@material-ui/core/styles';
import Badge from '@material-ui/core/Badge';
import MailIcon from '@material-ui/icons/Mail';
import Switch from '@material-ui/core/Switch';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Divider from '@material-ui/core/Divider';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/badges/badges.md
Expand Up @@ -7,7 +7,7 @@ components: Badge

<p class="description">Badge generates a small badge to the top-right of its child(ren).</p>

## Simple badges
## Basic badges

Examples of badges containing text, using primary and secondary colors. The badge is applied to its children.

Expand Down
4 changes: 0 additions & 4 deletions packages/material-ui/src/Badge/Badge.js
Expand Up @@ -186,10 +186,6 @@ const Badge = React.forwardRef(function Badge(props, ref) {
displayValue = badgeContent > max ? `${max}+` : badgeContent;
}

if (invisible && badgeContent === 0 && variant !== 'dot') {
displayValue = '1';
}

return (
<ComponentProp className={clsx(classes.root, className)} ref={ref} {...other}>
{children}
Expand Down

0 comments on commit fa9e6b2

Please sign in to comment.