Giter Site home page Giter Site logo

whats-new's Introduction

storybook-addon-whats-new

What is it?

This is a Storybook addon intended to let users see what's new with your repository. The recommendation is to link to your CHANGELOG.md for automated updates, or you can custom manage a Markdown file with more tailored updates.

How do I install it?

Install the dependency:

yarn add -D storybook-addon-whats-new

Storybook 5.3 and newer

Then add it to your .storybook/main.js

module.exports = {
  // other configs here
  addons: ['storybook-addon-whats-new']
}

Storybook <=5.2

Edit or create a file called addons.js in the Storybook config directory (by default, it’s .storybook). Add following content to it:

import 'storybook-addon-whats-new';

Getting Started

Local Configuration

To configure this addon, you must provide a whatsNewSource parameter with the location of your Markdown file to display:

import React from "react";
import { Button } from "./Button";
import WhatsNew from './WHATS_NEW.md';

export default {
  title: "Example/Button",
  component: Button,
  parameters: {
    whatsNewSource: WhatsNew,
  },
};

Global Configuration

If your want to show the What's New panel on every story you can configure it globally in .storybook/preview.js (.storybook/config.js for Storybook <= 5.2). To configure this addon, you must provide a whatsNewSource parameter with the location of your Markdown file to display:

import { addParameters } from '@storybook/react'; // <- or your storybook framework
import WhatsNew from './WHATS_NEW.md';

addParameters({
  whatsNewSource: WhatsNew,
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.