vue-material-adapter
Version:
Vue 3 wrapper arround Material Components for the Web
25 lines (22 loc) • 415 B
JavaScript
import { h } from 'vue';
export default {
name: 'mcw-icon-toggle',
props: {
isOn: Boolean,
},
setup(props, { slots }) {
return () => {
return h(
'i',
{
class: {
'material-icons': 1,
'mdc-icon-button__icon': true,
'mdc-icon-button__icon--on': props.isOn,
},
},
slots.default?.(),
);
};
},
};