import m from 'mithril' ; import classnames from 'classnames' ; import { Classes , IAttrs , ISizeAttrs } from '../../_shared' ; export interface IListAttrs extends IAttrs , ISizeAttrs { /** Wether to show background on item hover */ interactive ? : boolean ; [ htmlAttrs ] : any ; } export class List implements m . Component < IListAttrs > { public view ( { attrs , children } ) { const { class : className , size , interactive = true , ... htmlAttrs } = attrs ; return m ( '' , { ... htmlAttrs , class : classnames ( Classes . LIST , interactive && Classes . INTERACTIVE , size && `cui-${ size }` , className ) } , children ) ; } }