carbon-components-svelte/src/Grid/Row.svelte
Eric Liu f4c940d5ee
Make UI Shell HeaderAction panel transition configurable (#419)
* fix(ui-shell): remove fly transition from hamburger menu

* feat(header-action): make panel transition configurable

* chore: rebuild types, docs

* docs(ui-shell): document transition prop in Header app switcher example
2020-11-26 17:14:07 -08:00

50 lines
1.1 KiB
Svelte

<script>
/**
* @restProps {div}
* @slot {{ props: { class: string; [key: string]: any; } }}
*/
/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Row let:props><section {...props}>...</section></Row>)
*/
export let as = false;
/** Set to `true` to use the condensed variant */
export let condensed = false;
/** Set to `true` to use the narrow variant */
export let narrow = false;
/** Set to `true` to remove the gutter */
export let noGutter = false;
/** Set to `true` to remove the left gutter */
export let noGutterLeft = false;
/** Set to `true` to remove the right gutter */
export let noGutterRight = false;
$: props = {
...$$restProps,
class: [
$$restProps.class,
"bx--row",
condensed && "bx--row--condensed",
narrow && "bx--row--narrow",
noGutter && "bx--no-gutter",
noGutterLeft && "bx--no-gutter--left",
noGutterRight && "bx--no-gutter--right",
]
.filter(Boolean)
.join(" "),
};
</script>
{#if as}
<slot props="{props}" />
{:else}
<div {...props}>
<slot />
</div>
{/if}