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

error in the documentation example #13602

Closed
nicoleoliveira opened this issue Jan 11, 2021 · 1 comment · Fixed by #15568
Closed

error in the documentation example #13602

nicoleoliveira opened this issue Jan 11, 2021 · 1 comment · Fixed by #15568

Comments

@nicoleoliveira
Copy link

When using the descriptive example in Toolbars and Globals page as the following example:

export const getCaptionForLocale = (locale) => {
  switch(locale) {
    case 'es': return 'Hola!';
    case 'fr': return 'Bonjour!';
    case 'kr': return '안녕하세요!';
    case 'zh': return '你好!';
    default:
      return 'Hello!',
  }
}

<Story name="StoryWithLocale">
  {(args, { globals: { locale } }) => {
    const caption = getCaptionForLocale(locale);
    return <>{caption}</>;
  }}
</Story>

The errors below appear:
Captura de tela de 2021-01-11 10-28-19
Captura de tela de 2021-01-11 10-29-17

@jonniebigodes
Copy link
Contributor

@nicoleoliveira I've pushed a pull request addressing this issue, with said pull request the documentation is polished and the examples are properly referenced by their framework. Thank you for putting this on our radar and sorry for taking so long to address it. Please do let us know of any issues you run in with the documentation.

Stay safe

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

Successfully merging a pull request may close this issue.

3 participants