kibana/packages/kbn-shared-ux-storybook
Clint Andrew Hall 5bdad23a7e
[Shared UX] Redirect App Link to package (#131575)
* [Shared UX] Redirect App Link to package

* Fix types
2022-05-09 18:53:11 +02:00
..
src [Shared UX] Redirect App Link to package (#131575) 2022-05-09 18:53:11 +02:00
BUILD.bazel [typescript] Create Ambient Types package (#129368) 2022-04-06 19:21:24 -05:00
package.json [sharedUX] Move to Package-based Architecture (#127546) 2022-03-16 17:13:58 -04:00
README.mdx [sharedUX] Move to Package-based Architecture (#127546) 2022-03-16 17:13:58 -04:00
tsconfig.json [typescript] Create Ambient Types package (#129368) 2022-04-06 19:21:24 -05:00

---
id: kibSharedUXStorybook
slug: /kibana-dev-docs/shared-ux/packages/kbn-shared-ux-storybook
title: Shared UX Storybook
summary: The `@kbn/shared-ux-storybook` package provides Storybook assets for Shared UX and other teams.
date: 2022-03-11
tags: ['kibana', 'dev', 'sharedUX']
---

## About Shared UX Storybook

This package provides the Storybook implementation of `@kbn/shared-ux-services` as well as the configuration for the Shared UX Storybook site.

- `/src/services` The `@kbn/shared-ux-services` implementation.
- `src/config` The Storybook site configuration.

## Storybook site

Run `yarn storybook shared_ux` from `/kibana` to view the site.  It pulls in `*.stories.tsx` from all Shared UX packages and plugins and combines them into a single configuration.

## Decorator

If you're writing stories for your own components that compose Shared UX components, you can use a pre-configured [Storybook Decorator](https://storybook.js.org/docs/react/writing-stories/decorators) in your Storybook configuration:

```ts
// preview.ts

import { addDecorator } from '@storybook/react';
import { servicesDecorator } from '@kbn/shared-ux-storybook';

addDecorator(servicesDecorator);
```

This will not only expose parameters, but also wrap your story in a pre-wired `SharedUxServicesProvider`.