Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sample function on toggle

ANSWERED

The documentation says i can use this:

<Toggle
  settingsKey="toggle"
  label={`Toggle Switch: ${settings.toggle === 'true' ? 'on' : 'off'}`}
/>

but when i try this, it says settings is not defined. What is that ${settings...}? i have to add some import?

Thanks for the answers! 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

this seems to be the name of the function in which you are.


@daniele97 wrote:

The documentation says i can use this:

<Toggle
  settingsKey="toggle"
  label={`Toggle Switch: ${settings.toggle === 'true' ? 'on' : 'off'}`}
/>

but when i try this, it says settings is not defined. What is that ${settings...}? i have to add some import?

Thanks for the answers! 


 

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

this seems to be the name of the function in which you are.


@daniele97 wrote:

The documentation says i can use this:

<Toggle
  settingsKey="toggle"
  label={`Toggle Switch: ${settings.toggle === 'true' ? 'on' : 'off'}`}
/>

but when i try this, it says settings is not defined. What is that ${settings...}? i have to add some import?

Thanks for the answers! 


 

Best Answer
0 Votes