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

Add children to Translate #44

Open
davidlubomirov opened this issue May 20, 2020 · 1 comment
Open

Add children to Translate #44

davidlubomirov opened this issue May 20, 2020 · 1 comment

Comments

@davidlubomirov
Copy link

Hello,

I'm trying to achieve the following HTML in React:

<a className="collapsible-header">
// the value on the next line is the text which needs translation
    language
    <i className="material-icons">arrow_drop_down</i>
</a> 

and I'm trying this:

<Translate
     content="language"
     component="a"
     className="collapsible-header"
     children={
          <i className="material-icons">arrow_drop_down"</i>
      }
/>

But the "i" tag isn't rendered.

If the "children" isn't supported, is there another way for this ?

@martinandert
Copy link
Owner

@davidlubomirov I'm not sure what actually need to be translated. Perhaps it's "arrow_drop_down"?

Would doing it like this solve the issue?

<a className="collapsible-header">
  <Translate 
    component="i" 
    className="material-icons" 
    content="some.translation.key"
  />
</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants