Repository navigation
Using material-components with React and passing values into tags #5544
Unanswered
stefdude1999
asked this question in
Q&A
Replies: 2 comments
|
You can pass in function IconButton(props) {
return <md-icon-button>{props.children}</md-icon-button>;
}
function Usage() {
return <IconButton><md-icon>check</md-icon></IconButton>;
} |
0 replies
I tried to create a React library using this library along with lit/react. You can refer to my GitHub project for an example of how to work with React. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In a previous discussion, the question was about bringing material-web components in React, and the answer was to put them in a wrapper, and import that function. What if you wanted to create an icon button, something like this:
<md-icon-button> <md-icon>check</md-icon> </md-icon-button>How would I pass in an tag, with a check type of icon, or whatever other icon?
All reactions