@procore/storybook-addon 4.7.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +11 -9
- package/dist/legacy/index.cjs +5247 -7
- package/dist/legacy/index.d.cts +1 -1
- package/dist/legacy/index.d.ts +1 -1
- package/dist/legacy/index.js +5234 -3
- package/dist/legacy/preset.cjs +42 -249
- package/dist/legacy/preset.d.cts +88 -8
- package/dist/legacy/preset.d.ts +88 -8
- package/dist/legacy/preset.js +43 -250
- package/dist/modern/index.cjs +5247 -7
- package/dist/modern/index.d.cts +1 -1
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +5234 -3
- package/dist/modern/preset.cjs +42 -249
- package/dist/modern/preset.d.cts +88 -8
- package/dist/modern/preset.d.ts +88 -8
- package/dist/modern/preset.js +43 -250
- package/package.json +11 -16
- package/preset.js +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ An addon to customize procore theme and adds common used configuration.
|
|
|
8
8
|
yarn add -D @procore/storybook-addon
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
And add the addon to
|
|
11
|
+
And add the addon to your addon sets:
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
14
|
module.exports = {
|
|
@@ -16,11 +16,13 @@ module.exports = {
|
|
|
16
16
|
};
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
This
|
|
19
|
+
This addon provides essential functionality and addons used across different apps at Procore.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- [@storybook/addon-
|
|
21
|
+
## Included Addons
|
|
22
|
+
|
|
23
|
+
- [@storybook/addon-docs](https://storybook.js.org/addons/@storybook/addon-docs) - Documentation and documentation controls
|
|
24
|
+
- [@storybook/addon-a11y](https://storybook.js.org/addons/@storybook/addon-a11y) - Accessibility testing addon
|
|
25
|
+
- [@storybook/addon-styling-webpack](https://storybook.js.org/addons/@storybook/addon-styling-webpack) - Webpack styling configuration
|
|
24
26
|
|
|
25
27
|
## Usage
|
|
26
28
|
|
|
@@ -33,12 +35,12 @@ This simple addon adds 3 main addon used across different apps at Procore.
|
|
|
33
35
|
- a hower text ${\text{\color{green}{Core}}}$
|
|
34
36
|
- the link to core design system [https://design.procore.com](https://design.procore.com) on the logo.
|
|
35
37
|
|
|
36
|
-
In order to set the theme by default values ${\text{\color{green}{createProcoreTheme}}}$ needs to be added in `manager.
|
|
38
|
+
In order to set the theme by default values ${\text{\color{green}{createProcoreTheme}}}$ needs to be added in `manager.ts`. If no parameter has been passed to the `createProcoreTheme` the aforementioned default values will be set.
|
|
37
39
|
|
|
38
40
|
```tsx
|
|
39
41
|
// .storybook/manager.js
|
|
40
42
|
import { createProcoreTheme } from '@procore/storybook-addon';
|
|
41
|
-
import { addons } from '
|
|
43
|
+
import { addons } from 'storybook/manager-api';
|
|
42
44
|
|
|
43
45
|
addons.setConfig({
|
|
44
46
|
theme: createProcoreTheme(),
|
|
@@ -51,7 +53,7 @@ For more configuration please visit: https://storybook.js.org/docs/react/configu
|
|
|
51
53
|
// .storybook/manager.js
|
|
52
54
|
// example below will override Procore default theming configuration
|
|
53
55
|
import { createProcoreTheme } from '@procore/storybook-addon';
|
|
54
|
-
import { addons } from '
|
|
56
|
+
import { addons } from 'storybook/manager-api';
|
|
55
57
|
|
|
56
58
|
addons.setConfig({
|
|
57
59
|
theme: createProcoreTheme({
|
|
@@ -103,4 +105,4 @@ Please refer to [Storybook Docs](https://storybook.js.org/docs/react/configure/o
|
|
|
103
105
|
|
|
104
106
|
## Testing
|
|
105
107
|
|
|
106
|
-
This addon should be tested by running `storybook` in `example-apps/react-ts`
|
|
108
|
+
This addon should be tested by running `storybook` in `example-apps/react-ts` app.
|