mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
Initial pass at Layer (new component) #1892
This commit is contained in:
parent
559701ec86
commit
f349b505f9
9 changed files with 568 additions and 241 deletions
33
types/Layer/Layer.svelte.d.ts
vendored
Normal file
33
types/Layer/Layer.svelte.d.ts
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface LayerProps {
|
||||
/**
|
||||
* Specify the layer level and override any existing levels based on hierarchy.
|
||||
* @default undefined
|
||||
*/
|
||||
level?: 0 | 1 | 2;
|
||||
|
||||
/**
|
||||
* Specify the HTML element to render. If none is specified, a `div` is rendered.
|
||||
* @default "div"
|
||||
*/
|
||||
as?: typeof import("svelte").SvelteComponent;
|
||||
|
||||
/**
|
||||
* Specify the Layer HTML element props
|
||||
* @default {}
|
||||
*/
|
||||
layerProps?: import("svelte/elements").HTMLElementAttributes;
|
||||
|
||||
/**
|
||||
* Set an id for the Layer component
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
*/
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export default class Layer extends SvelteComponentTyped<
|
||||
LayerProps,
|
||||
Record<string, any>,
|
||||
{ default: {} }
|
||||
> {}
|
Loading…
Add table
Add a link
Reference in a new issue