mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(popover): add Popover component
This commit is contained in:
parent
1df92756fb
commit
a3a4a02d94
10 changed files with 280 additions and 4 deletions
59
types/Popover/Popover.d.ts
vendored
Normal file
59
types/Popover/Popover.d.ts
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface PopoverProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Set to `true` to display the popover
|
||||
* @default false
|
||||
*/
|
||||
open?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` render a caret
|
||||
* @default false
|
||||
*/
|
||||
caret?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the alignment of the caret
|
||||
* @default "top"
|
||||
*/
|
||||
align?:
|
||||
| "top"
|
||||
| "top-left"
|
||||
| "top-right"
|
||||
| "bottom"
|
||||
| "bottom-left"
|
||||
| "bottom-right"
|
||||
| "left"
|
||||
| "left-bottom"
|
||||
| "left-top"
|
||||
| "right"
|
||||
| "right-bottom"
|
||||
| "right-top";
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @default false
|
||||
*/
|
||||
light?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the high contrast variant
|
||||
* @default false
|
||||
*/
|
||||
highContrast?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use a relative position
|
||||
* @default false
|
||||
*/
|
||||
relative?: boolean;
|
||||
}
|
||||
|
||||
export default class Popover extends SvelteComponentTyped<
|
||||
PopoverProps,
|
||||
{},
|
||||
{ default: {} }
|
||||
> {}
|
1
types/index.d.ts
vendored
1
types/index.d.ts
vendored
|
@ -86,6 +86,7 @@ export { default as OverflowMenuItem } from "./OverflowMenu/OverflowMenuItem";
|
|||
export { default as Pagination } from "./Pagination/Pagination";
|
||||
export { default as PaginationSkeleton } from "./Pagination/PaginationSkeleton";
|
||||
export { default as PaginationNav } from "./PaginationNav/PaginationNav";
|
||||
export { default as Popover } from "./Popover/Popover";
|
||||
export { default as ProgressIndicator } from "./ProgressIndicator/ProgressIndicator";
|
||||
export { default as ProgressIndicatorSkeleton } from "./ProgressIndicator/ProgressIndicatorSkeleton";
|
||||
export { default as ProgressStep } from "./ProgressIndicator/ProgressStep";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue