mirror of https://github.com/explosion/spaCy.git
Add more human-readable class names [ci skip]
This commit is contained in:
parent
162bd4d75b
commit
e711969e3b
|
@ -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}
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
Loading…
Reference in New Issue