@justeattakeaway/pie-form-label 0.6.0 → 0.8.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 +5 -61
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
1. [Introduction](#pie-form-label)
|
|
14
14
|
2. [Installation](#installation)
|
|
15
15
|
3. [Importing the component](#importing-the-component)
|
|
16
|
-
4. [
|
|
17
|
-
5. [
|
|
18
|
-
6. [
|
|
19
|
-
7. [Testing](#testing)
|
|
16
|
+
4. [Peer Dependencies](#peer-dependencies)
|
|
17
|
+
5. [Props](#props)
|
|
18
|
+
6. [Contributing](#contributing)
|
|
20
19
|
|
|
21
20
|
## pie-form-label
|
|
22
21
|
|
|
@@ -56,31 +55,6 @@ import { PieFormLabel } from '@justeattakeaway/pie-form-label/dist/react';
|
|
|
56
55
|
> [!IMPORTANT]
|
|
57
56
|
> When using `pie-form-label`, you will also need to include a couple of dependencies to ensure the component renders as expected. See [the PIE Wiki](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components#expected-dependencies) for more information and how to include these in your application.
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
## Local development
|
|
61
|
-
|
|
62
|
-
Install the dependencies. Note that this, and the following commands below, should be run from the **root of the monorepo**:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
yarn
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
To build the `pie-form-label` package, run the following command:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
yarn build --filter=pie-form-label
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
If you'd like to develop using the component storybook, then you should build the component in `watch` mode, and run storybook in a separate terminal tab:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
yarn watch --filter=pie-form-label
|
|
78
|
-
|
|
79
|
-
# in a separate terminal tab, run
|
|
80
|
-
yarn dev --filter=pie-storybook
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
|
|
84
58
|
## Props
|
|
85
59
|
|
|
86
60
|
| Property | Type | Default | Description |
|
|
@@ -99,36 +73,6 @@ In your markup or JSX, you can then use these to set the properties for the `pie
|
|
|
99
73
|
<PieFormLabel>Label</PieFormLabel>
|
|
100
74
|
```
|
|
101
75
|
|
|
102
|
-
##
|
|
103
|
-
|
|
104
|
-
### Browser tests
|
|
105
|
-
|
|
106
|
-
To run the browser tests, run the following command from the root of the monorepo:
|
|
76
|
+
## Contributing
|
|
107
77
|
|
|
108
|
-
|
|
109
|
-
yarn test:browsers --filter=pie-form-label
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Visual tests
|
|
113
|
-
|
|
114
|
-
To run the visual regression tests, run the following command from the root of the monorepo:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
yarn test:visual --filter=pie-form-label
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Note: To run these locally, you will need to ensure that any environment variables required are set up on your machine to mirror those on CI (such as Percy tokens). How you achieve this will differ between operating systems.
|
|
121
|
-
|
|
122
|
-
#### Setup via bash
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
export PERCY_TOKEN_PIE_FORM_LABEL=abcde
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
#### Setup via package.json
|
|
129
|
-
|
|
130
|
-
Under scripts `test:visual` replace the environment variable with the below:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
PERCY_TOKEN_PIE_FORM_LABEL=abcde
|
|
134
|
-
```
|
|
78
|
+
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).
|
package/package.json
CHANGED