We've circled around this one a few times, but when trying to create a Button with an icon it for the theme tester, I have realised that without an icon widget, it is not straight forward for a user to use the dojo 2 icons in their own apps.
// with an icon widget
w(Button, {}, [
'search',
w(Icon, { type: 'search' })
])
// without an icon widget
import * as iconCss from '@dojo/widgets/theme/common/icons.m.css'
@theme(iconCss)
w(Button, {}, [
'search ',
v('i', { classes: this.theme([ iconCss.icon, iconCss.searchIcon ])})
])
Enhancement
We've circled around this one a few times, but when trying to create a Button with an icon it for the theme tester, I have realised that without an icon widget, it is not straight forward for a user to use the dojo 2 icons in their own apps.