Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an icon widget #463

Closed
tomdye opened this issue Feb 2, 2018 · 1 comment
Closed

Create an icon widget #463

tomdye opened this issue Feb 2, 2018 · 1 comment
Assignees
Milestone

Comments

@tomdye
Copy link
Member

tomdye commented Feb 2, 2018

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.

// 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 ])})
])
@tomdye
Copy link
Member Author

tomdye commented Feb 15, 2018

Icon widget will likely need to export a list of icon classes available likely using keyof on it's css file so that it's icon property can be typed.

@maier49 maier49 mentioned this issue Feb 16, 2018
3 tasks
@tomdye tomdye mentioned this issue Feb 28, 2018
3 tasks
@dylans dylans added this to the rc.1 milestone Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants