> For the complete documentation index, see [llms.txt](https://atomico.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atomico.gitbook.io/doc/espanol/guias/sistemas-de-diseno/storybook/atomico-storybook.md).

# @atomico/storybook

@atomico/storybook posee como objetivo:

1. Entregar un decorador para renderizar el JSX/HTML y serializar el codigo de las historias.
2. Entregar un generador de argTypes/args segun el componente dado.

## Decorador para renderizar el JSX/HTML&#x20;

```javascript
import { decorador } from "@atomico/storybook";
```

`decorator` permite renderizar el JSX/HTML usando el render de Atomico, este también permite serializar el JSX y HTML declarado en su historia, ejemplo:

### Ejemplo de renderización y serialización del JSX

<figure><img src="/files/opgysNssL3AsI8C0eemv" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
La serialización del JSX ocurre solo si se define`parameters.docs.source = 'jsx'` por historia o global en `.storybook/preview.js.`

Esta funcionalidad solo es compatible con versiones >= atomico\@1.70.0 gracias a la [característica de nombres automáticos según definición del componente](https://atomico.gitbook.io/doc/api/virtualdom/advanced#class-name-inheritance)
{% endhint %}

### Ejemplo de renderización y serialización del HTML

<figure><img src="/files/2oX7oQsh607ofJ9AA42d" alt=""><figcaption></figcaption></figure>

## Generador de argTypes/args según el componente dado

```javascript
import { define } from "@atomico/storybook";
import { Button } from "./button";

export default {
    title: "Component/Button"
    ...define(Button) 
}
```

### Ejemplo&#x20;

<figure><img src="/files/uOV6SDYH8DekPVatdBMJ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://atomico.gitbook.io/doc/espanol/guias/sistemas-de-diseno/storybook/atomico-storybook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
