carbon-components-svelte/types/Grid/Column.d.ts
Richard O'flynn b597a64131
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>
2020-11-27 04:08:30 -08:00

82 lines
1.6 KiB
TypeScript

/// <reference types="svelte" />
export type ColumnSize = boolean | number;
export interface ColumnSizeDescriptor {
span?: ColumnSize;
offset: number;
}
export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
export interface ColumnProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Column let:props><article {...props}>...</article></Column>)
* @default false
*/
as?: boolean;
/**
* Set to `true` to remove the gutter
* @default false
*/
noGutter?: boolean;
/**
* Set to `true` to remove the left gutter
* @default false
*/
noGutterLeft?: boolean;
/**
* Set to `true` to remove the right gutter
* @default false
*/
noGutterRight?: boolean;
/**
* Set to `true` to add top and bottom padding to the column
* @default false
*/
padding?: boolean;
/**
* Specify the aspect ratio of the column
*/
aspectRatio?: "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1";
/**
* Set the small breakpoint
*/
sm?: ColumnBreakpoint;
/**
* Set the medium breakpoint
*/
md?: ColumnBreakpoint;
/**
* Set the large breakpoint
*/
lg?: ColumnBreakpoint;
/**
* Set the extra large breakpoint
*/
xlg?: ColumnBreakpoint;
/**
* Set the maximum breakpoint
*/
max?: ColumnBreakpoint;
}
export default class Column {
$$prop_def: ColumnProps;
$$slot_def: {
default: { props: { class: string; [key: string]: any } };
};
$on(eventname: string, cb: (event: Event) => void): () => void;
}