Skip to content

Releases: kivra/toybox

v2.0.3

15 Jul 08:18
e6e0191
Compare
Choose a tag to compare

2.0.3 (2024-07-15)

Bug Fixes

v2.0.2

12 Jul 13:00
940a8f3
Compare
Choose a tag to compare

2.0.2 (2024-07-12)

Bug Fixes

  • match react-router-dom version with react-components (#50) (940a8f3)

v2.0.1

10 Jul 06:39
0f80202
Compare
Choose a tag to compare

2.0.1 (2024-07-10)

Bug Fixes

  • set navbar items to be open by default (#49) (0f80202)

v2.0.0

03 Jul 12:05
bc05c3f
Compare
Choose a tag to compare

2.0.0 (2024-07-03)

Bug Fixes

  • add node version to actions/setup-node (#48) (bc05c3f)

Features

BREAKING CHANGES

  • This updates the ui parts of toybox, and introduces new properties to
    present stories in another way!

Startpage

You can now create a start page story. You can specify this in
toybox.config.js.

const config: Config = {
  startpageComponentPath: "startpage.story.md",
};

Story header properties

  • Each story can now include a status type, which displays a Badge
    indicating the current status of a component.
  • If you wish to change the background display of your story render,
    variant has a couple of styles that you can try!
  • By using hideControls, codeTemplates spans the full width by hiding
    the property toolbar.
  • A new type named import has been added, which illustrates how to
    import a component. Optionally, you can name another npm package in your
    story, otherwise it will default to what you specify the
    npmPackageName field in toybox.config.js.

Here is a breakdown of the new changes in the story file

header: {
    title: 'Button', // Title of story
    description:
      'Buttons communicate actions that users can take. Button labels express what action will occur when the user interacts with it.', // Description of the story.
    storyButtons: [
      // Demonstrates component import. Package name defaults to toybox.config.ts setting.
      {
        type: 'import'
        value: 'Button',
      },
      // Status of the component.
      {
        type: 'status',
        value: 'core' | 'not-supported' | 'deprecated';
      },
      // For 'github' type, URL is optional. It can be auto-generated from the component name or manually provided.
      { type: 'github' },
      // For figma `url` is a link to the design of the component.
      {
        type: 'figma',
        url: 'https://www.figma.com/',
      },
    ],
  },
  stories: [
    {
      name: 'How to use the Button component', // The name of this story
      center: true, // Should the component be in center or not
      hideControls: true, // Hides the prop toolbar
      /**
       * The code template will show how to use the component.
       * `props` is a string representation of all stings in a single line.
       * If you want to show the props on multi lines you can use `props.asMultiline(indentSpace)` instead.
       */
      codeTemplate: (props, children) => `
        <Button${props}>
          ${children}
        </Button>`,
      variant: "filled" | "transparent", // Optionally, you can switch to another background on the codeTemplate.
      render(},) {
        return (
          <YourComponent />
        );
      },
    };
  ]
};

Preview:

ui-update-toybox

v1.7.0

14 May 13:36
e08eba1
Compare
Choose a tag to compare

1.7.0 (2024-05-14)

Features

  • upgrade vite and change build target (#45) (e08eba1)

v1.6.14

23 Oct 04:21
7f4348b
Compare
Choose a tag to compare

1.6.14 (2023-10-23)

Bug Fixes

  • deps: update mantine monorepo to v6.0.21 (#41) (7f4348b)

v1.6.13

23 Oct 04:17
e267d6b
Compare
Choose a tag to compare

1.6.13 (2023-10-23)

Bug Fixes

  • deps: update dependency markdown-to-jsx to v7.3.2 (#35) (e267d6b)

v1.6.12

20 Oct 07:03
ca90690
Compare
Choose a tag to compare

1.6.12 (2023-10-20)

Bug Fixes

v1.6.11

13 Sep 14:15
bf407c3
Compare
Choose a tag to compare

1.6.11 (2023-09-13)

Bug Fixes

v1.6.10

15 Aug 14:35
e559f0e
Compare
Choose a tag to compare

1.6.10 (2023-08-15)

Bug Fixes

  • deps: update dependency @vitejs/plugin-react to v4.0.4 (#29) (e559f0e)