Skip to content

Commit 2980a58

Browse files
upgrade to dndkit v6 (#11)
* chore: 🤖 yarn -> npm * chore: 🤖 npx storybook@latest upgrade * chore: 🤖 upgrade @dnd-kit/core ^6 close#6 * chore: 🤖 update example * ci: 🎡 remove chromatic close#9
1 parent 9463a64 commit 2980a58

File tree

12 files changed

+30136
-19442
lines changed

12 files changed

+30136
-19442
lines changed

.github/workflows/chromatic.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/size.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.storybook/main.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ module.exports = {
33
'../src/**/*.stories.@(ts|tsx|js|jsx)',
44
'../stories/**/*.stories.@(ts|tsx|js|jsx)',
55
],
6-
addons: [
7-
'@storybook/addon-links',
8-
'@storybook/addon-essentials',
9-
{
10-
name: '@storybook/addon-postcss',
11-
options: {
12-
postcssLoaderOptions: {
13-
implementation: require('postcss'),
14-
},
6+
7+
addons: ['@storybook/addon-links', '@storybook/addon-essentials', {
8+
name: '@storybook/addon-postcss',
9+
options: {
10+
postcssLoaderOptions: {
11+
implementation: require('postcss'),
1512
},
1613
},
17-
],
14+
}, '@storybook/addon-webpack5-compiler-swc', '@chromatic-com/storybook'],
15+
1816
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
1917
typescript: {
20-
check: true, // type-check stories during Storybook build
18+
// type-check stories during Storybook build
19+
check: true,
20+
21+
reactDocgen: 'react-docgen-typescript'
22+
},
23+
24+
framework: {
25+
name: '@storybook/react-webpack5',
26+
options: {}
2127
},
28+
29+
docs: {}
2230
};

.storybook/preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export const parameters = {
55
// https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args
66
actions: { argTypesRegex: '^on.*' },
77
};
8+
export const tags = ['autodocs'];

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You should focus the `features` of your app, not DnD boilerplate.
2020
## Install
2121

2222
```sh
23-
yarn add @thaddeusjiang/react-sortable-list
23+
npm install @thaddeusjiang/react-sortable-list
2424
```
2525

2626
## Usage
@@ -114,7 +114,6 @@ export const ChildrenExample: React.VFC = () => {
114114
### Use Case: Custom Drag Handler
115115

116116
```jsx
117-
118117
const DragHandler = (props) => (
119118
<div
120119
{...props}
@@ -165,7 +164,6 @@ export const DragHandlerExample: React.VFC = () => {
165164
</SortableList>
166165
);
167166
};
168-
169167
```
170168

171169
### Use Case: Complex Component
@@ -220,7 +218,6 @@ export const ComplexComponentExample: React.VFC = () => {
220218
</SortableList>
221219
);
222220
};
223-
224221
```
225222

226223
### Use Case: Horizontal Sortable List
@@ -243,7 +240,6 @@ export const HorizontalExample: React.VFC = () => {
243240
</div>
244241
);
245242
};
246-
247243
```
248244

249245
### Optional: disabled Drag and Drop
@@ -277,26 +273,26 @@ export const ItemRenderExample: React.VFC = () => {
277273
Run inside another terminal:
278274

279275
```bash
280-
yarn storybook
276+
npm run storybook
281277
```
282278

283279
### Example
284280

285281
Then run the example inside another:
286282

287283
```bash
288-
yarn link
284+
npm run link
289285

290286
cd example
291-
yarn link "@thaddeusjiang/react-sortable-list"
292-
yarn # or yarn to install dependencies
293-
yarn start
287+
npm run link "@thaddeusjiang/react-sortable-list"
288+
npm install
289+
npm run start
294290
```
295291

296292
### Run tests
297293

298294
```sh
299-
yarn run test
295+
npm run run test
300296
```
301297

302298
## Author

0 commit comments

Comments
 (0)