@cryptofi/core-ui 0.21.0 → 0.22.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/README.md +4 -2
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +18 -4
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ Launch Storybook to view components or develop locally:
|
|
|
10
10
|
yarn dev
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
The Storybook build is also available at https://bit.ly/cryptofi-storybook, with the latest changes deployed there when a new version of Core UI is published to NPM.
|
|
14
|
+
|
|
13
15
|
### Adding a Component
|
|
14
16
|
|
|
15
17
|
1. Create a new directory in the **components** directory using the following structure. Note that a component can consist of only a React component file (tsx) or a theme files (ts) depending on how it is structured.
|
|
@@ -31,10 +33,10 @@ const CFButton = ({ children }: { children: React.reactNode }) => {
|
|
|
31
33
|
};
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
3. Add the component file to **
|
|
36
|
+
3. Add the component file to the root **index.ts**, using the `Cf` prefix as a namespace to differentiate between similarly named Chakra components:
|
|
35
37
|
|
|
36
38
|
```
|
|
37
|
-
export { default as
|
|
39
|
+
export { default as CfButton } from './Button/Button'
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
4. Add the component theme to the corresponding section of the **src/theme.ts** file under the `components` key.
|