Socket
Socket
Sign inDemoInstall

@storybook/types

Package Overview
Dependencies
Maintainers
30
Versions
727
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/types

Core Storybook Types


Version published
Weekly downloads
7.7M
decreased by-7.92%
Maintainers
30
Weekly downloads
 
Install size
Created

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

7.0.0-beta.61 (March 4, 2023)

Features
  • Docs: Show MDX errors using our error overlay #21369
Bug Fixes
  • Core: Remove state deprecation warnings by default #21367
  • Core: Fix default export storySort handling #21389
  • Vue3: Add slot TS types #21359
  • Docs: Fix issue with referencing non-story files with names similar or equal to docs files #21348
Maintenance
  • Docs: Update invalid <Meta of={}> error to be more helpful. #21365
Dependency Upgrades
  • Upgrade react-docgen-typescript-plugin for TS4.8 #21380

Readme

Source

Storybook Types

Storybook types exports only typescript types for storybook usage.

It exports typescript enums, which do have a runtime implementation. But it should not export any implementation such as classes, method, function or constants.

It also has no dependencies, all the types it exports are bundled in.

Keywords

FAQs

Package last updated on 03 Mar 2023

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc