@graphcommerce/docs 8.1.0-canary.14 → 8.1.0-canary.16
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 +4 -0
- package/framework/icons.md +14 -20
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/framework/icons.md
CHANGED
|
@@ -160,13 +160,11 @@ imported from there (the `<IconSvg>` component will convert the relative path to
|
|
|
160
160
|
an absolute path)
|
|
161
161
|
|
|
162
162
|
```tsx
|
|
163
|
-
|
|
163
|
+
//...
|
|
164
164
|
import customIcon from './my-custom-icon.svg'
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
return
|
|
168
|
-
<IconSvg src={iconSucustomIconpport} size='large' />
|
|
169
|
-
)
|
|
166
|
+
//...
|
|
167
|
+
return <IconSvg src={customIcon} size='large' />
|
|
170
168
|
```
|
|
171
169
|
|
|
172
170
|
To use a custom icon in your component, follow the same steps as described in
|
|
@@ -177,27 +175,23 @@ the [previous paragraph](#using-a-different-icon-from-the-icon-pack).
|
|
|
177
175
|
|
|
178
176
|
## Using a different icon pack
|
|
179
177
|
|
|
180
|
-
To override all or multiple icons with your own,
|
|
181
|
-
|
|
178
|
+
To override all or multiple icons with your own, you can write a replace plugin
|
|
179
|
+
to achieve this:
|
|
182
180
|
|
|
183
181
|
```tsx
|
|
184
|
-
// /
|
|
185
|
-
import {
|
|
182
|
+
// /plugins/icons/Icons.ts
|
|
183
|
+
import { PluginConfig } from '@graphcommerce/next-config'
|
|
184
|
+
import iconBasket from './basket.svg'
|
|
186
185
|
import customCartIcon from './my-custom-cart-icon.svg'
|
|
187
186
|
import customChatIcon from './my-custom-chat-icon.svg'
|
|
188
187
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
export const config: PluginConfig = {
|
|
189
|
+
type: 'replace',
|
|
190
|
+
module: '@graphcommerce/next-ui',
|
|
191
|
+
}
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
[iconCart, customCartIcon],
|
|
196
|
-
[iconChat, customChatIcon],
|
|
197
|
-
],
|
|
198
|
-
},
|
|
199
|
-
})
|
|
200
|
-
// ...
|
|
193
|
+
export const iconShoppingBag = iconBasket
|
|
194
|
+
export const iconChart = iconBasket
|
|
201
195
|
```
|
|
202
196
|
|
|
203
197
|
All icons must meet the svg specifications as described above
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
-
"version": "8.1.0-canary.
|
|
5
|
+
"version": "8.1.0-canary.16",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^8.1.0-canary.16"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|