Add /playground and initial tooltips

This commit is contained in:
Melvin Valster
2019-07-24 21:52:38 +02:00
parent 94a0a97fbf
commit 36742ea22e
14 changed files with 260 additions and 32 deletions
+4 -2
View File
@@ -7,6 +7,7 @@ import classNames from 'classnames'
interface Props {
/** Name of the selected class, lowercase */
selected?: string
center?: boolean
}
const classNameForItem = (c: ClassData, selected: string) => classNames('class-picker__class', {
@@ -18,10 +19,11 @@ export class ClassPicker extends React.PureComponent<Props> {
static whyDidYouRender = true
render() {
const { selected } = this.props
const { selected, center = false } = this.props
const cn = classNames('class-picker', {
'class-picker--has-selection': !!selected
'class-picker--has-selection': !!selected,
'class-picker--center': center,
})
return (