Skip to content

Commit f4de909

Browse files
authored
Merge pull request repath-project#1 from mfoulks3200/mfoulks/wip
Migrated to storybook docs
2 parents a3e5fc3 + 747c70e commit f4de909

27 files changed

+13044
-30756
lines changed

.gitignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@
99

1010
# production
1111
/dist
12-
/docs/dist
12+
/storybook-static
1313

1414
# misc
1515
.DS_Store
1616

17-
# umi
18-
.umi
19-
.umi-production
20-
.umi-test
21-
.env.local
22-
2317
# ide
2418
/.vscode
2519
/.idea
20+
21+
*storybook.log

.storybook/main.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import type { StorybookConfig } from '@storybook/react-webpack5';
2+
import path from 'path';
3+
4+
const config: StorybookConfig = {
5+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
6+
addons: [
7+
'@storybook/addon-webpack5-compiler-swc',
8+
'@storybook/addon-essentials',
9+
'@storybook/addon-onboarding',
10+
'@chromatic-com/storybook',
11+
'@storybook/addon-interactions',
12+
{
13+
name: '@storybook/addon-styling-webpack',
14+
options: {
15+
rules: [
16+
// Replaces existing CSS rules to support CSS Modules
17+
{
18+
test: /\.css$/,
19+
use: [
20+
'style-loader',
21+
{
22+
loader: 'css-loader',
23+
options: {
24+
modules: {
25+
localIdentName: '[name]__[local]--[hash:base64:5]',
26+
},
27+
},
28+
},
29+
],
30+
},
31+
{
32+
test: /\.less$/i,
33+
use: [
34+
'style-loader',
35+
{
36+
loader: 'css-loader',
37+
options: {
38+
sourceMap: true,
39+
modules: {
40+
localIdentName: '[name]__[local]--[hash:base64:5]',
41+
},
42+
},
43+
},
44+
'less-loader',
45+
],
46+
},
47+
],
48+
},
49+
},
50+
],
51+
framework: {
52+
name: '@storybook/react-webpack5',
53+
options: {},
54+
},
55+
webpackFinal: async (config) => {
56+
config.resolve!.alias = {
57+
...config.resolve!.alias,
58+
'@/*': path.resolve(__dirname, '../src/*'),
59+
};
60+
61+
config.resolve?.extensions?.push('.less', '.css');
62+
63+
return config;
64+
},
65+
};
66+
export default config;

.storybook/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Preview } from '@storybook/react'
2+
3+
const preview: Preview = {
4+
parameters: {
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/i,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# React Timeline Editor
2-
[![npm version](https://img.shields.io/npm/v/@xzdarcy/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@xzdarcy/react-timeline-editor)
3-
[![npm downloads](https://img.shields.io/npm/dm/@xzdarcy/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@xzdarcy/react-timeline-editor)
2+
[![npm version](https://img.shields.io/npm/v/@mfoulks3200/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@mfoulks3200/react-timeline-editor)
3+
[![npm downloads](https://img.shields.io/npm/dm/@mfoulks3200/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@mfoulks3200/react-timeline-editor)
44

5-
**[React Timeline Editor](https://zdarcy.com/)** is a react component used to quickly build a timeline animation editor.
5+
**[React Timeline Editor](https://react-timeline-editor-docs.vercel.app/)** is a react component used to quickly build a timeline animation editor.
66

7-
![example](https://github.com/xzdarcy/react-timeline-editor/blob/f79d85eee8a723e5210c04232daf2c51888418c0/public/assets/timeline.gif)
7+
![example](https://github.com/mfoulks3200/react-timeline-editor/blob/f79d85eee8a723e5210c04232daf2c51888418c0/public/assets/timeline.gif)
88
## Getting Started
99

1010
```bash
@@ -60,5 +60,7 @@ const TimelineEditor = () => {
6060
```
6161

6262
## Documention
63-
Checkout the [Docs](https://zdarcy.com/) for a demonstration of some basic and advanced features.
63+
Checkout the [Docs](https://react-timeline-editor-docs.vercel.app/) for a demonstration of some basic and advanced features.
6464

65+
## Attribution
66+
This project is a fork of the awesome original package [@xzdarcy/react-timeline-editor](https://github.com/xzdarcy/react-timeline-editor).

0 commit comments

Comments
 (0)