@newtonschool/grauity 1.1.12 → 1.1.13

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 CHANGED
@@ -30,7 +30,7 @@ Like gravity itself, the principles of great design are universal, omnipresent,
30
30
 
31
31
  ### Component Naming Convention
32
32
 
33
- gra.UI.ty components should be prefixed by *NS*.
33
+ gra.UI.ty components should be prefixed by _NS_.
34
34
  For example, `NSButton`, `NSTable`, `NSInput`
35
35
 
36
36
  ### Alias
@@ -98,8 +98,8 @@ After you have made changes in grauity, build it.
98
98
  grauity$: npm run build
99
99
  ```
100
100
 
101
- If changes are not showing up even after rebuilding, you may
102
- have to delete `newton-web/node_modules/@newtonschool/grauity`
101
+ If changes are not showing up even after rebuilding, you may
102
+ have to delete `newton-web/node_modules/@newtonschool/grauity`
103
103
  and install it again using
104
104
 
105
105
  ```bash
@@ -110,7 +110,7 @@ newton-web$: npm run dev
110
110
  Then simply import components you want from `@newtonschool/grauity` in `newton-web` like so:
111
111
 
112
112
  ```js
113
- import { NSButton, BUTTON_VARIANTS_ENUM } from "@newtonschool/grauity";
113
+ import { NSButton, BUTTON_VARIANTS_ENUM } from '@newtonschool/grauity';
114
114
  ```
115
115
 
116
116
  And use it as you wish
@@ -119,38 +119,49 @@ And use it as you wish
119
119
  import { NSButton } from '@newtonschool/grauity';
120
120
 
121
121
  export const MyComponent = () => (
122
- <NSButton
123
- variant='primary'
124
- onClick={() => {
125
- setShowFormErrors(true);
126
- }}
127
- >
128
- Click me!
129
- </NSButton>
130
- )
122
+ <NSButton
123
+ variant="primary"
124
+ onClick={() => {
125
+ setShowFormErrors(true);
126
+ }}
127
+ >
128
+ Click me!
129
+ </NSButton>
130
+ );
131
131
  ```
132
132
 
133
133
  ## How to's
134
134
 
135
135
  ### Add icons
136
+
136
137
  Adding new icons is easy. Design team to provide `.svg` files for new icons, and they are to be added to the [./iconland/seeds/](iconland/seeds) directory. Then follow these steps:
137
138
 
139
+ ### 0. Update the iconland submodule in grauity
140
+
141
+ ```bash
142
+ grauity$: git submodule update --remote --merge
143
+ ```
144
+
138
145
  #### 1. Generate icons
146
+
139
147
  ```bash
140
148
  grauity$: npm run build-icons:generate
141
149
  ```
142
150
 
143
151
  #### 2. Optimise icons (from [[iconland/seeds/]](iconland/seeds/) to [iconland/optimised/](iconland/optimised/) )
152
+
144
153
  ```bash
145
154
  grauity$: npm run build-icons:optimize
146
155
  ```
147
156
 
148
157
  #### 3. Build font icons from optimised icons
158
+
149
159
  ```bash
150
160
  grauity$: npm run build-icons
151
161
  ```
152
162
 
153
163
  ### Use icons in newton-web
164
+
154
165
  To use grauity icons, add the following import in `global-styles.scss` or any root-level CSS/SCSS file. Make sure CSS/SCSS loaders are setup properly in your app.
155
166
 
156
167
  ```js