Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

201
Visualizações
How can I add copy to storybook stories in CSF (React)?

I've implemented some stories in MDX with no format. I'm using @storybook/react version ^6.3.12. Here's a brief example:

## Examples

### Dark Background

The same styling works on light or dark background.

*Due to a storybook bug, you cannot see dark-background stories in the Docs
page.  Use the Canvas page instead.*

<Canvas>
  <Story
    name="Dark Background" 
    parameters={{
      backgrounds: {default: 'dark'}
    }}  
    args={{}}
  >
    {args => (
      <Selector assets={[...fixtures, ...fixtures]} />
    )}  
  </Story>
</Canvas>

### Few Assets

With only a few assets, the slider works the same way but without moving the 
thumbnails.

<Canvas>
  <Story name="Few assets" args={{}}>
    {args => (
      <Selector assets={[fixtures[0], fixtures[1]]} />
    )}  
  </Story>
</Canvas>

Due to problems with MDX, I'm switching to CSF. Here's a brief example (the second example from above).

export const FewAssets = (args) => (
  <Selector assets={[fixtures[0], fixtures[1]]} />
);
FewAssets.args = {...};
// and so on with parameters or whatever.

I've read the docs many times now. I can't quite seem to figure out how to add copy to the page in CSF:

### Few Assets

With only a few assets, the slider works the same way but without moving the 
thumbnails.

I thought of just adding it into the story definition, but then the docs page shows all that markup when you look at the code sample.

Am I missing something obvious?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda