Skip to content

Commit

Permalink
Merge pull request #54 from bbbtech/migrate-to-org
Browse files Browse the repository at this point in the history
migrate package to bbbtech
  • Loading branch information
bhishp authored Jun 20, 2022
2 parents 8b68c36 + 0b6f3ad commit 3e75214
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
19 changes: 14 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,31 @@ A [Storybook](https://storybook.js.org/) Addon and Decorator to wrap Formik Fiel

![example screenshot](https://user-images.githubusercontent.com/12024258/70381969-9c13b400-194b-11ea-8444-582933bf30f5.png)

You can see the example stories in action [here](https://bhishp.github.io/storybook-formik/).
You can see the example stories in action [here](https://bbbtech.github.io/storybook-formik/).

Thanks to [@jaredpalmer](https://jaredpalmer.com/) for giving us the amazing [formik](https://github.com/jaredpalmer/formik) library and making forms great again.

## Migration to BBB Tech

Note, this package has been migrated to the org: [BBB Tech](https://github.com/bbbtech). The only real difference this
means is that the package needs to be installed with a new command, scoped by the org's slug (i.e. `npm i --save-dev @bbbtech/storybook-formik`)
and to update the path when registering the package in your main.js.

It also means that all future versions will be released under the new package, so please migrate your dependency if you
want to get future versions.

## Install

```sh
npm install --save-dev storybook-formik
npm install --save-dev @bbbtech/storybook-formik
```

Then register the addon in `.storybook/main.js`

```ts
module.exports = {
stories: ['../stories/**/*.stories.tsx'],
addons: ['storybook-formik/register']
addons: ['@bbbtech/storybook-formik/register']
};
```

Expand Down Expand Up @@ -72,15 +81,15 @@ personalInfoSubform.parameters = personalInfoParams;
This gives you the benefit of rendering formik Fields that are expecting formik context, but also to track the key formik state
within the storybook panel below.

See the [example stories](https://github.com/bhishp/storybook-formik/blob/master/stories/) for further examples
See the [example stories](https://github.com/bbbtech/storybook-formik/blob/master/stories/) for further examples

### Legacy story format

Example with the `storiesOf` syntax.

```tsx
import { storiesOf } from '@storybook/react';
import withFormik from 'storybook-formik';
import withFormik from '@bbbtech/storybook-formik';

import PersonalInfoSubform from '<your_component_path>/PersonalInfoSubform';

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "storybook-formik",
"name": "@bbbtech/storybook-formik",
"version": "2.4.1",
"description": "A storybook addon that allows you to use components in your stories that rely on Formik context and see internal Formik state in a panel.",
"repository": {
"type": "git",
"url": "https://github.com/bhishp/storybook-formik"
"url": "https://github.com/bbbtech/storybook-formik"
},
"homepage": "https://bhishp.github.io/storybook-formik/",
"homepage": "https://bbbtech.github.io/storybook-formik/",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"typings": "dist/types/index.d.ts",
Expand All @@ -25,6 +25,9 @@
"format": "prettier --trailing-comma es5 --single-quote --write 'src/**/*' 'test/**/*' 'README.md' '/docs/**/*.md'",
"test": "jest"
},
"publishConfig": {
"access": "public"
},
"files": [
"dist/**/*",
"register.js"
Expand Down

0 comments on commit 3e75214

Please sign in to comment.