mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Add padding prop to Grid component (#420)
* Add padding prop to Grid component * Fix file name * Build lib * Typo Co-authored-by: Richard O'flynn <richard.oflynn@brighter-software.co.uk>
This commit is contained in:
parent
f4c940d5ee
commit
b597a64131
11 changed files with 116 additions and 0 deletions
|
@ -4661,6 +4661,16 @@
|
|||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "padding",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` to add top and bottom padding to all columns",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"slots": [
|
||||
|
@ -4737,6 +4747,16 @@
|
|||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "padding",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` to add top and bottom padding to all columns",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"slots": [
|
||||
|
@ -4794,6 +4814,16 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "padding",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` to add top and bottom padding to the column",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "aspectRatio",
|
||||
"kind": "let",
|
||||
|
|
|
@ -33,3 +33,7 @@ components: ["Grid", "Row", "Column"]
|
|||
### Aspect ratio columns
|
||||
|
||||
<FileSource src="/framed/Grid/AspectRatioColumns" />
|
||||
|
||||
### Padded columns
|
||||
|
||||
<FileSource src="/framed/Grid/PaddedGrid" />
|
||||
|
|
29
docs/src/pages/framed/Grid/PaddedGrid.svelte
Normal file
29
docs/src/pages/framed/Grid/PaddedGrid.svelte
Normal file
|
@ -0,0 +1,29 @@
|
|||
<script>
|
||||
import { Grid, Row, Column } from "carbon-components-svelte";
|
||||
</script>
|
||||
|
||||
<Grid narrow padding>
|
||||
<Row>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
</Row>
|
||||
</Grid>
|
||||
|
||||
<Grid narrow>
|
||||
<Row padding>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
</Row>
|
||||
<Row>
|
||||
<Column padding style="outline: 1px solid var(--cds-interactive-04)">
|
||||
Column
|
||||
</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
<Column style="outline: 1px solid var(--cds-interactive-04)">Column</Column>
|
||||
</Row>
|
||||
</Grid>
|
Loading…
Add table
Add a link
Reference in a new issue