We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code is a simple demo to create a IconButton. As you see, even the simplest demo will take 7 lines. It's to boring.
<NButton> <template #icon> <NIcon> <SomeIcon /> </NIcon> </template> </NButton>
Add a "renderIcon" attribute to NButton. Then we can write come code like below:
<NButton :renderIcon="renderIcon(SomeIcon)" />
That makes code clearer and easier to understand.
The text was updated successfully, but these errors were encountered:
feat(button): adds icon prop, closes tusen-ai#4007
icon
16e30fd
render-icon
feat(button): adds render-icon prop (#4011)
dc5bf7d
* feat(button): adds `icon` prop, closes #4007 * chore: changelog * refractor: change to `render-icon` function Co-authored-by: 07akioni <07akioni2@gmail.com>
Successfully merging a pull request may close this issue.
This function solves the problem (这个功能解决的问题)
The following code is a simple demo to create a IconButton.
As you see, even the simplest demo will take 7 lines. It's to boring.
Expected API (期望的 API)
Add a "renderIcon" attribute to NButton.
Then we can write come code like below:
That makes code clearer and easier to understand.
The text was updated successfully, but these errors were encountered: