Socket
Socket
Sign inDemoInstall

@storybook/types

Package Overview
Dependencies
1
Maintainers
11
Versions
671
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/types


Version published
Weekly downloads
9.8M
increased by5.35%
Maintainers
11
Created
Weekly downloads
 

Package description

What is @storybook/types?

The @storybook/types package provides TypeScript definitions and utility types for Storybook, a popular tool for developing UI components in isolation. It facilitates type checking and development within the Storybook ecosystem, ensuring that components and their stories adhere to expected types.

What are @storybook/types's main functionalities?

Storybook Component Types

Defines types for Storybook stories, ensuring that the stories and their configurations adhere to the correct structure and types.

import { Story, Meta } from '@storybook/types';

export default {
  title: 'Button',
  component: Button
} as Meta;

export const Primary: Story = (args) => <Button {...args} />;
Primary.args = {
  primary: true,
  label: 'Click Me'
};

Addon Development

Provides types for developing Storybook addons, helping developers to integrate additional functionality into Storybook with type safety.

import { Addon } from '@storybook/types';

const myAddon: Addon = {
  title: 'My Custom Addon',
  type: 'panel',
  render: ({ active, key }) => (active ? <div id={key}>Addon Content</div> : null)
};

Other packages similar to @storybook/types

Changelog

Source

8.2.2

  • CPC: Add ESM export to docs-tools & node-logger packages - #28539, thanks @ndelangen!
  • CPC: Fix missing dependency in @storybook/addon-interactions - #28518, thanks @ndelangen!
  • CPC: Revert renames of panels, addon_ids - #28524, thanks @ndelangen!

Keywords

FAQs

Last updated on 11 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc