Breakpoint operations
1 operation, breakpoints.update. It runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| breakpoints.update | breakpoints.update with validated settings and revisioned undo. | breakpoints.edit | none |
breakpoints.update
breakpoints.update with validated settings and revisioned undo.
Example input
{
"before": [
{
"id": "base",
"label": "Base"
},
{
"id": "sm",
"label": "Phone landscape",
"minWidth": 480
},
{
"id": "md",
"label": "Tablet",
"minWidth": 768
},
{
"id": "lg",
"label": "Desktop",
"minWidth": 1024
},
{
"id": "xl",
"label": "Wide",
"minWidth": 1440
}
],
"styleBreakpoints": [
{
"id": "base",
"label": "Base"
},
{
"id": "sm",
"label": "Phone landscape",
"minWidth": 480
},
{
"id": "md",
"label": "Tablet",
"minWidth": 768
},
{
"id": "lg",
"label": "Desktop",
"minWidth": 1024
},
{
"id": "xl",
"label": "Wide",
"minWidth": 1600
}
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| styleBreakpoints | array of object | yes | |
| styleBreakpoints[].id | string | yes | |
| styleBreakpoints[].label | string | yes | At least 1 character. |
| styleBreakpoints[].minWidth | integer | no | More than 0. |
| styleBreakpoints[].maxWidth | integer | no | More than 0. |
| styleBreakpoints[].condition | object | object | object | object | object | object | object | object | no | |
| before | array of object | yes | |
| before[].id | string | yes | |
| before[].label | string | yes | At least 1 character. |
| before[].minWidth | integer | no | More than 0. |
| before[].maxWidth | integer | no | More than 0. |
| before[].condition | object | object | object | object | object | object | object | object | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| settings | record of any JSON | yes |
Try it
yarn splash breakpoints.update '{"before":[{"id":"base","label":"Base"},{"id":"sm","label":"Phone landscape","minWidth":480},{"id":"md","label":"Tablet","minWidth":768},{"id":"lg","label":"Desktop","minWidth":1024},{"id":"xl","label":"Wide","minWidth":1440}],"styleBreakpoints":[{"id":"base","label":"Base"},{"id":"sm","label":"Phone landscape","minWidth":480},{"id":"md","label":"Tablet","minWidth":768},{"id":"lg","label":"Desktop","minWidth":1024},{"id":"xl","label":"Wide","minWidth":1600}]}' --dry-runGenerated from the operation registry and the MCP tool catalogue (source a493da2be7522ebc).
Something wrong on this page? Write to docs@librettocms.com.