@justeattakeaway/pie-icon-button 0.24.0 → 0.24.2
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 +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ import { PieIconButton } from '@justeattakeaway/pie-icon-button/dist/react';
|
|
|
76
76
|
|
|
77
77
|
## Importing Icons
|
|
78
78
|
|
|
79
|
-
We recommend using the `pie-icon-button` component alongside the `pie-icons-webc` package. This package contains all of the PIE
|
|
79
|
+
We recommend using the `pie-icon-button` component alongside the `pie-icons-webc` package. This package contains all of the PIE icons as importable web components and are built to work alongside our other PIE components.
|
|
80
80
|
|
|
81
81
|
`pie-icon-button` provides a slot into which you can pass your chosen icon, and it will automatically size it to the correct dimensions depending on the `size` of the `pie-icon-button` component.
|
|
82
82
|
|
|
@@ -86,17 +86,17 @@ To import an icon using `pie-icons-webc`, you should import the icon that you wo
|
|
|
86
86
|
|
|
87
87
|
```js
|
|
88
88
|
import { PieIconButton } from '@justeattakeaway/pie-icon-button';
|
|
89
|
-
import '@justeattakeaway/pie-icons-webc/
|
|
89
|
+
import '@justeattakeaway/pie-icons-webc/IconClose';
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Then, in your markup, you would implement the component like this:
|
|
93
93
|
|
|
94
94
|
```html
|
|
95
|
-
<pie-icon-button><icon-close
|
|
95
|
+
<pie-icon-button><icon-close></icon-close></pie-icon-button>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
> [!WARNING]
|
|
99
|
-
> Usually, icons imported from `pie-icons-webc` can be resized by specifying the `size` prop (such as `<icon-close size="xl"
|
|
99
|
+
> Usually, icons imported from `pie-icons-webc` can be resized by specifying the `size` prop (such as `<icon-close size="xl"></icon-close>`).
|
|
100
100
|
> These size props will have no effect when used alongside the `pie-icon-button` component, as the icon is resized with respect to the size of the `pie-icon-button`.
|
|
101
101
|
|
|
102
102
|
|
|
@@ -113,10 +113,10 @@ In your HTML markup or JSX, you can then use these to set the properties for the
|
|
|
113
113
|
|
|
114
114
|
```html
|
|
115
115
|
<!-- Native HTML -->
|
|
116
|
-
<pie-icon-button size='small' type='button' variant='secondary'><icon-close
|
|
116
|
+
<pie-icon-button size='small' type='button' variant='secondary'><icon-close></icon-close></pie-icon-button>
|
|
117
117
|
|
|
118
118
|
<!-- JSX -->
|
|
119
|
-
<PieIconButton size='small' type='button' variant='secondary'><icon-close
|
|
119
|
+
<PieIconButton size='small' type='button' variant='secondary'><icon-close></icon-close></PieIconButton>
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
## Events
|
|
@@ -130,21 +130,21 @@ For example, to add a click handler in various templates:
|
|
|
130
130
|
|
|
131
131
|
```html
|
|
132
132
|
<!-- Other attributes omitted for clarity -->
|
|
133
|
-
<pie-icon-button onclick="e => console.log(e)"><icon-close
|
|
133
|
+
<pie-icon-button onclick="e => console.log(e)"><icon-close></icon-close></pie-icon-button>
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
### Vue templates (using Nuxt 3)
|
|
137
137
|
|
|
138
138
|
```html
|
|
139
139
|
<!-- Other attributes omitted for clarity -->
|
|
140
|
-
<pie-icon-button @click="handleClick"><icon-close
|
|
140
|
+
<pie-icon-button @click="handleClick"><icon-close></icon-close></pie-icon-button>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
### React templates (using Next 13)
|
|
144
144
|
|
|
145
145
|
```html
|
|
146
146
|
<!-- Other attributes omitted for clarity -->
|
|
147
|
-
<PieIconButton onClick={handleClick}><icon-close
|
|
147
|
+
<PieIconButton onClick={handleClick}><icon-close></icon-close></PieIconButton>
|
|
148
148
|
|
|
149
149
|
```
|
|
150
150
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-icon-button",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "PIE Design System Icon Button built using Web Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "Just Eat Takeaway.com - Design System Team",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@justeattakeaway/pie-icons-webc": "0.
|
|
29
|
+
"@justeattakeaway/pie-icons-webc": "0.14.0",
|
|
30
30
|
"@justeattakeaway/pie-spinner": "0.3.1",
|
|
31
31
|
"@justeattakeaway/pie-webc-core": "0.13.0"
|
|
32
32
|
},
|