Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
manisuec committed Oct 26, 2021
0 parents commit 50cf69d
Show file tree
Hide file tree
Showing 27 changed files with 49,119 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
build/
storybook-static/
25 changes: 25 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const path = require("path");

module.exports = {
stories: ["../src/**/*.stories.tsx"],
// Add any Storybook addons you want here: https://storybook.js.org/addons/
addons: [],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../")
});

config.module.rules.push({
test: /\.(ts|tsx)$/,
loader: require.resolve("babel-loader"),
options: {
presets: [["react-app", { flow: false, typescript: true }]]
}
});
config.resolve.extensions.push(".ts", ".tsx");

return config;
}
};
67 changes: 67 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* Read https://storybook.js.org/docs/react/configure/overview#configure-story-rendering
* for more information about the purpose of this file.
*
* Use preview.js for global code (such as CSS imports or JavaScript mocks)
* that applies to all stories. For example, `import thirdPartyCss.css`.
*
* This file can have three exports:
* - decorators - an array of global decorators
* - parameters - an object of global parameters
* - globalTypes - definition of globalTypes
*/

/**
* Decorators
*
* A decorator is a way to wrap a story in extra “rendering” functionality.
*
* Example:
*
* import React from 'react';
* export const decorators = [(Story) => <div style={{ margin: '3em' }}><Story/></div>];
*
* Each story throughout the library will be wrapped in a div with a margin of 3
*/

/**
* Parameters
*
* Most Storybook addons are configured via a parameter-based API.
* You can set global parameters in this file
*
* export const parameters = {
* backgrounds: {
* values: [
* { name: 'red', value: '#f00' },
* { name: 'green', value: '#0f0' },
* ],
* },
* };
*
* With backgrounds, you configure the list of backgrounds that every story can render in.
*/

/**
* Global Types
*
* Global Types allow you to add your own toolbars by creating
* globalTypes with a toolbar annotation:
*
* For example:
*
* export const globalTypes = {
* theme: {
* name: 'Theme',
* description: 'Global theme for components',
* defaultValue: 'light',
* toolbar: {
* icon: 'circlehollow',
* // array of plain string values or MenuItem shape
* items: ['light', 'dark'],
* },
* },
* };
*
* Will add a new dropdown in your toolbar with options light and dark.
**/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Harvey Delaney

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 50cf69d

Please sign in to comment.