import {MDCRadio} from '@material/radio/'; import {h} from 'preact'; import MaterialComponent from '../Base/MaterialComponent'; export interface IRadioProps { checked?: boolean; disabled?: boolean; } export interface IRadioState {} export class Radio extends MaterialComponent { public MDComponent?: MDCRadio; protected componentName = 'radio'; protected mdcProps = ['disabled']; protected mdcNotifyProps = ['checked']; public componentDidMount() { super.componentDidMount(); if (this.control) { this.MDComponent = new MDCRadio(this.control); } this.afterComponentDidMount(); } public componentWillUnmount() { super.componentWillUnmount(); if (this.MDComponent) { this.MDComponent.destroy(); } } protected materialDom(allprops) { const {className, ...props} = allprops; return (
); } } export default Radio;