@appquality/unguess-design-system 3.0.3-alpha → 3.0.3

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/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # UNGUESS Design System
2
+
3
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
4
+
5
+ ## Used by
6
+
7
+ - [Unguess platform](https://app.unguess.io/)
8
+
9
+ ## Tech stack
10
+
11
+ Building components
12
+
13
+ - ðŸŠī [Zendesk Garden](https://garden.zendesk.com/) as base design system
14
+ - ⚛ïļ [React](https://reactjs.org/) declarative component-centric UI
15
+ - 📚 [Storybook](https://storybook.js.org) for UI component development and [auto-generated docs](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a)
16
+ - ðŸ‘Đ‍ðŸŽĪ [Styled Components](https://styled-components.com/) for component-scoped styling
17
+
18
+ Maintaining the system
19
+
20
+ - ðŸ“Ķ [Yarn](https://yarnpkg.com/) for package management
21
+ - ðŸ“Ķ [NPM](https://www.npmjs.com/) for distribution
22
+ - ✅ [Chromatic](https://www.chromatic.com/) to prevent UI bugs in components (by Storybook maintainers)
23
+
24
+ ## Why
25
+
26
+ The Unguess design system codifies existing UI components into a central, well-maintained repository. It is built to address having to paste the same components into multiple projects again and again. This simplifies building UI's with Storybook's design patterns.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ yarn
32
+ ```
33
+
34
+ ## Global Styles
35
+
36
+ Components within the design system assume that a set of global styles have been configured. Depending upon the needs of the application, this can be done several ways:
37
+
38
+ #### Option 1: Render the `GlobalStyle` component
39
+
40
+ Useful when you don't need any custom `body` styling in the application, typically this would be placed in a layout component that wraps all pages, or a top-level `App` component.
41
+
42
+ ```javascript
43
+ import { global } from '@storybook/design-system';
44
+ const { GlobalStyle } = global;
45
+ ```
46
+
47
+ ```javascript
48
+ /* Render the global styles once per page */
49
+ <GlobalStyle />
50
+ ```
51
+
52
+ #### Option 2: Use the `bodyStyles` to apply styling
53
+
54
+ Useful when you want build upon the shared global styling.
55
+
56
+ ```javascript
57
+ import { Global, css } from '@storybook/theming';
58
+ import { global } from '@storybook/design-system';
59
+ const { bodyStyles } = global;
60
+
61
+ const customGlobalStyle = css`
62
+ body {
63
+ ${bodyStyles}// Custom body styling for the app
64
+ }
65
+ `;
66
+
67
+ const CustomGlobalStyle = () => <Global styles={customGlobalStyle} />;
68
+ ```
69
+
70
+ ```javascript
71
+ /* Render the global styles once per page */
72
+ <CustomGlobalStyle />
73
+ ```