File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed
Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -118,10 +118,8 @@ The following components are defined in `@object-ui/types/data-display`:
118118{
119119 "type" : " badge" ,
120120 "id" : " status-badge" ,
121- "props" : {
122- "label" : " New" ,
123- "variant" : " default"
124- }
121+ "label" : " New" ,
122+ "variant" : " default"
125123}
126124```
127125
@@ -207,6 +205,31 @@ When creating or using components:
2072057 . ✅ ** SHOULD** support ` id ` for unique identification
2082068 . ✅ ** MAY** use ObjectUI extensions (className, visibleOn, etc.)
209207
208+ ### Property Placement Guide
209+
210+ ** Component-specific properties** → Top level:
211+ ``` json
212+ {
213+ "type" : " alert" ,
214+ "title" : " Welcome" , // ✅ Component-specific
215+ "variant" : " default" , // ✅ Component-specific
216+ "dismissible" : true // ✅ Component-specific
217+ }
218+ ```
219+
220+ ** Standard HTML/ARIA attributes** → props object:
221+ ``` json
222+ {
223+ "type" : " alert" ,
224+ "title" : " Welcome" ,
225+ "props" : {
226+ "role" : " alert" , // ✅ HTML attribute
227+ "aria-live" : " polite" , // ✅ ARIA attribute
228+ "data-testid" : " alert" // ✅ Data attribute
229+ }
230+ }
231+ ```
232+
210233## Related Packages
211234
212235- ** [ @objectstack/spec ] ( ../../packages/objectstack-spec ) ** - Universal UI component specification
You can’t perform that action at this time.
0 commit comments