-
-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
966 additions
and
501 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['dnd-kit'], | ||
}; | ||
extends: ['dnd-kit', 'plugin:storybook/recommended'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
import {dirname, join} from 'path'; | ||
import {mergeConfig} from 'vite'; | ||
import {addons} from '@storybook/manager-api'; | ||
|
||
import {theme} from './theme'; | ||
|
||
addons.setConfig({ | ||
theme, | ||
}); | ||
|
||
export default { | ||
stories: ['../stories/**/*.stories.mdx', '../stories/**/*.stories.tsx'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
framework: '@storybook/react-vite', | ||
core: { | ||
builder: '@storybook/builder-vite', | ||
addons: [ | ||
getAbsolutePath('@storybook/addon-links'), | ||
getAbsolutePath('@storybook/addon-essentials'), | ||
], | ||
framework: { | ||
name: getAbsolutePath('@storybook/react-vite'), | ||
options: {}, | ||
}, | ||
async viteFinal(config, {configType}) { | ||
// customize the Vite config here | ||
return mergeConfig(config, { | ||
define: {'process.env': {}}, | ||
define: { | ||
'process.env': {}, | ||
}, | ||
}); | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
}; | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {addons} from '@storybook/manager-api'; | ||
import {theme} from './theme'; | ||
|
||
addons.setConfig({ | ||
theme, | ||
showPanel: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import {create} from '@storybook/theming/create'; | ||
import {default as brandImage} from './assets/dnd-kit-banner.svg'; | ||
|
||
export const theme = create({ | ||
base: 'light', | ||
brandImage: | ||
'https://raw.githubusercontent.com/clauderic/dnd-kit/master/.storybook/assets/dnd-kit-banner.svg', | ||
brandImage, | ||
appBg: '#F9F9F9', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function cloneDeep(obejct: Object) { | ||
return JSON.parse(JSON.stringify(obejct)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export {classNames} from './classnames'; | ||
export {cloneDeep} from './cloneDeep'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.