Add more human-readable class names [ci skip]

This commit is contained in:
Ines Montani 2019-02-25 20:22:40 +01:00
parent 162bd4d75b
commit e711969e3b
2 changed files with 6 additions and 4 deletions

View File

@ -26,10 +26,10 @@ const Sidebar = ({ items, pageMenu, slug }) => {
}, []) }, [])
return ( return (
<menu className={classes.root}> <menu className={classNames('sidebar', classes.root)}>
{items.map((section, i) => ( {items.map((section, i) => (
<ul className={classes.section} key={i}> <ul className={classes.section} key={i}>
<li className={classes.label}>{section.label}</li> <li className={classNames('h0', classes.label)}>{section.label}</li>
{section.items.map(({ text, url, onClick, menu, isActive }, j) => { {section.items.map(({ text, url, onClick, menu, isActive }, j) => {
const currentMenu = menu || pageMenu || [] const currentMenu = menu || pageMenu || []
const active = isActive || slug === url const active = isActive || slug === url
@ -43,7 +43,7 @@ const Sidebar = ({ items, pageMenu, slug }) => {
to={url} to={url}
onClick={onClick} onClick={onClick}
className={itemClassNames} className={itemClassNames}
activeClassName={classes.isActive} activeClassName={classNames('is-active', classes.isActive)}
hideIcon hideIcon
> >
{text} {text}

View File

@ -46,8 +46,10 @@ export const Table = props => <table className={classes.root} {...props} />
export const Th = props => <th className={classes.th} {...props} /> export const Th = props => <th className={classes.th} {...props} />
export const Tr = ({ children, ...props }) => { export const Tr = ({ children, ...props }) => {
const foot = isFootRow(children)
const trClasssNames = classNames(classes.tr, { const trClasssNames = classNames(classes.tr, {
[classes.footer]: isFootRow(children), [classes.footer]: foot,
'table-footer': foot,
}) })
return ( return (