You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+23-4
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ class Dropdown extends Component {
126
126
127
127
### Define _meta
128
128
129
-
Every component has a static property called `_meta`. This object defines the component. The values here are used in `propTypes`, generated documentation, generated test cases, and some utilities.
129
+
Every component has a static property called `_meta`. This object defines the component. The values here are used for handling props, generated documentation, generated test cases and some utilities.
130
130
131
131
Here's an example `_meta` object:
132
132
@@ -136,9 +136,7 @@ import { META } from '../../lib'
136
136
const_meta= {
137
137
name:'MyComponent',
138
138
type:META.TYPES.MODULE,
139
-
props: {
140
-
pointing: ['bottom left', 'bottom right'],
141
-
},
139
+
props: ['as', 'children', 'className'],
142
140
}
143
141
```
144
142
@@ -162,6 +160,27 @@ class MyComponent {
162
160
}
163
161
```
164
162
163
+
### Using propTypes
164
+
165
+
Every component must have fully described `propTypes`, values for them are defined in `props`.
Review [common tests](#common-tests) below. You should now add the [`isConformant()`](#isconformant-required) common test and get it to pass. This will validate the `_meta` and help you get your component off the ground.
0 commit comments