Download wp-calypso/client/state/admin-menu/schema.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 694 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/schema.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/admin-menu/schema.js
-
curl -L -o schema.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/schema.js
694 Bytes
| const commonItemPropsSchema = { | |
| slug: { type: 'string' }, | |
| title: { type: 'string' }, | |
| type: { type: 'string' }, | |
| url: { type: 'string' }, | |
| badge: { type: 'string' }, | |
| }; | |
| const menuItemsSite = { | |
| type: 'array', | |
| items: { | |
| type: 'object', | |
| required: [ 'type' ], | |
| properties: { | |
| ...commonItemPropsSchema, | |
| icon: { type: 'string' }, | |
| children: { | |
| type: 'array', | |
| items: { | |
| type: 'object', | |
| required: [ 'type', 'parent' ], | |
| properties: { | |
| ...commonItemPropsSchema, | |
| parent: { type: 'string' }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| additionalProperties: false, | |
| }; | |
| export const menusSchema = { | |
| type: 'object', | |
| patternProperties: { | |
| '^\\d+$': menuItemsSite, | |
| }, | |
| }; | |