-
Notifications
You must be signed in to change notification settings - Fork 114
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
95 changed files
with
2,914 additions
and
1,475 deletions.
There are no files selected for viewing
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,35 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"ie": "11", | ||
"edge": "17", | ||
"firefox": "60", | ||
"chrome": "67", | ||
"safari": "11.1" | ||
} | ||
} | ||
], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript", | ||
[ | ||
"@emotion/babel-preset-css-prop", | ||
{ | ||
"sourceMap": "true", | ||
"autoLabel": "true", | ||
"labelFormat": "[local]", | ||
"cssPropOptimization": "false" | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
"macros", | ||
["@babel/proposal-class-properties", {"loose": true}], | ||
"@babel/proposal-object-rest-spread", | ||
["@babel/proposal-private-methods", {"loose": true}], | ||
["@babel/proposal-private-property-in-object", {"loose": true}], | ||
"@babel/plugin-transform-runtime" | ||
] | ||
} |
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 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
stories: ['../packages/**/*.stories.mdx', '../packages/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-a11y', | ||
'@storybook/addon-knobs', | ||
'@storybook/addon-actions', | ||
'@storybook/addon-viewport', | ||
'storybook-addon-performance', | ||
], | ||
typescript: { | ||
// enable type checking | ||
check: true, | ||
checkOptions: { | ||
// check all ts and tsx files, but not fixtures as they include errors on purpose | ||
reportFiles: ['packages/**/*.{ts,tsx}', '!**/__testfixtures__/**/*', '!**/__fixtures__/**/*'], | ||
}, | ||
// choose react-docgen-typescript to generate the prop tables | ||
reactDocgen: 'react-docgen-typescript', | ||
reactDocgenTypescriptOptions: { | ||
shouldExtractLiteralValuesFromEnum: true, | ||
// don't include node_module props as you'll cause the machine to run out of memory on our repo | ||
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true), | ||
}, | ||
}, | ||
}; |
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,41 @@ | ||
import React from 'react'; | ||
import {INITIAL_VIEWPORTS} from '@storybook/addon-viewport'; | ||
import {withPerformance} from 'storybook-addon-performance'; | ||
import {Theme} from '@twilio-paste/theme'; | ||
import {Box} from '@twilio-paste/box'; | ||
|
||
export const globalTypes = { | ||
theme: { | ||
name: 'Paste Theme', | ||
description: 'Global theme for components', | ||
defaultValue: 'default', | ||
toolbar: { | ||
// All available icons | ||
// https://github.com/storybookjs/storybook/blob/master/lib/components/src/icon/icons.tsx | ||
icon: 'paintbrush', | ||
// array of plain string values or MenuItem shape (see below) | ||
items: ['sendgrid', 'console', 'default'], | ||
}, | ||
}, | ||
}; | ||
|
||
export const decorators = [ | ||
(Story, context) => { | ||
const theme = context.globals.theme; | ||
return ( | ||
<Theme.Provider theme={theme}> | ||
<Box padding="space40"> | ||
<Story /> | ||
</Box> | ||
</Theme.Provider> | ||
); | ||
}, | ||
withPerformance, | ||
]; | ||
|
||
export const parameters = { | ||
actions: {argTypesRegex: '^on[A-Z].*'}, | ||
viewport: { | ||
viewports: INITIAL_VIEWPORTS, | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ declare module '*.md' { | |
const value: string; | ||
export default value; | ||
} | ||
declare module '*.png' |
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.