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

Use app-bar icon styling with custom element #905

Closed
wants to merge 1 commit into from
Closed

Conversation

mfrye
Copy link

@mfrye mfrye commented Jun 21, 2015

This probably isn't the right way to do this, but I wanted to use a custom element and then wrap it in the same styling and on click handling. If there's another way to do this please let me know.

@hai-cea
Copy link
Member

hai-cea commented Jun 22, 2015

@mfrye Can you tell me a bit more of your use case please? I'm not understanding what you're trying to achieve.

@mfrye
Copy link
Author

mfrye commented Jun 22, 2015

It's pretty basic. I simply wanted a back button to appear using a svg icon
and have it look / function the same as the menu icon. When I tried to
insert an icon using the iconLeft prop I have to manually add the styling
and apply the onTouchTap cb.
On Jun 21, 2015 8:34 PM, "Hai Nguyen" [email protected] wrote:

@mfrye https://github.com/mfrye Can you tell me a bit more of your use
case please? I'm not understanding what you're trying to achieve.


Reply to this email directly or view it on GitHub
#905 (comment)
.

@hai-cea
Copy link
Member

hai-cea commented Jun 22, 2015

@mfrye Ah ok. I think the better way to do it would be to use React.cloneElement to add in the appropriate props to leftIconElement instead of generating the div.

@oliviertassinari
Copy link
Member

@mfrye I think that your use case is solved with #967. The style is set correctly. However, you have to set the onTouchTap prop to your custom LeftElement.

@hai-cea
Copy link
Member

hai-cea commented Jul 11, 2015

@mfrye I'm closing this for now - please open an issue if @oliviertassinari's suggestion doesn't work.

@hai-cea hai-cea closed this Jul 11, 2015
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
* Fix displaying of long dates in DateTimePicker

* [mui#900[ Revert mui#773

* Rename selected and disabled classes to remove warning
@zannager zannager added the package: icons Specific to @mui/icons label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: icons Specific to @mui/icons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants