Breakpoint (#733)

* feat(breakpoint): add Breakpoint

* docs(breakpoint): update docs

* refactor(breakpoint): add prop descriptions, type slot

* docs: add missing semicolon to last typedef

* docs: decrease margin bottom for inline snippet

* docs: add Breakpoint to new components [ci skip]

* docs(config): use "scripts-markup-styles" for svelteSortOrder [ci skip]

* docs(breakpoint): label on:match event [ci skip]
This commit is contained in:
Eric Liu 2021-07-07 12:40:06 -07:00 committed by GitHub
commit f31ab25e0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 308 additions and 5 deletions

View file

@ -1,5 +1,5 @@
{
"total": 170,
"total": 171,
"components": [
{
"moduleName": "Accordion",
@ -344,6 +344,67 @@
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
},
{
"moduleName": "Breakpoint",
"filePath": "src/Breakpoint/Breakpoint.svelte",
"props": [
{
"name": "size",
"kind": "let",
"description": "Determine the current Carbon grid breakpoint size",
"type": "BreakpointSize",
"isFunction": false,
"constant": false,
"reactive": true
},
{
"name": "sizes",
"kind": "let",
"description": "Carbon grid sizes as an object",
"type": "Record<BreakpointSize, boolean>",
"value": "{ sm: false, md: false, lg: false, xlg: false, max: false, }",
"isFunction": false,
"constant": false,
"reactive": true
},
{
"name": "breakpoints",
"kind": "const",
"description": "Reference the Carbon grid breakpoints",
"type": "Record<BreakpointSize, BreakpointValue>",
"value": "{ sm: 320, md: 672, lg: 1056, xlg: 1312, max: 1584, }",
"isFunction": false,
"constant": true,
"reactive": false
}
],
"slots": [
{
"name": "__default__",
"default": true,
"slot_props": "{ size: BreakpointSize; sizes: Record<BreakpointSize, boolean>; }"
}
],
"events": [
{
"type": "dispatched",
"name": "match",
"detail": "{ size: BreakpointSize; breakpointValue: BreakpointValue; }"
}
],
"typedefs": [
{
"type": "\"sm\" | \"md\" | \"lg\" | \"xlg\" | \"max\"",
"name": "BreakpointSize",
"ts": "type BreakpointSize = \"sm\" | \"md\" | \"lg\" | \"xlg\" | \"max\""
},
{
"type": "320 | 672 | 1056 | 1312 | 1584",
"name": "BreakpointValue",
"ts": "type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584"
}
]
},
{
"moduleName": "Button",
"filePath": "src/Button/Button.svelte",