mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
feat(recursive-list): add RecursiveList
This commit is contained in:
parent
0d3090b123
commit
92301b1d46
10 changed files with 254 additions and 3 deletions
34
types/RecursiveList/RecursiveList.d.ts
vendored
Normal file
34
types/RecursiveList/RecursiveList.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface Item {
|
||||
text?: string;
|
||||
href?: string;
|
||||
html?: string;
|
||||
}
|
||||
|
||||
export interface RecursiveListProps {
|
||||
/**
|
||||
* Specify the items to render
|
||||
* @default []
|
||||
*/
|
||||
items?: Array<Item & { items?: Item[] }>;
|
||||
|
||||
/**
|
||||
* Specify the type of list to render
|
||||
* @default "unordered"
|
||||
*/
|
||||
type?: "unordered" | "ordered" | "ordered-native";
|
||||
|
||||
/**
|
||||
* Set to `true` to use the nested variant
|
||||
* @default false
|
||||
*/
|
||||
nested?: boolean;
|
||||
}
|
||||
|
||||
export default class RecursiveList extends SvelteComponentTyped<
|
||||
RecursiveListProps,
|
||||
{},
|
||||
{}
|
||||
> {}
|
1
types/index.d.ts
vendored
1
types/index.d.ts
vendored
|
@ -99,6 +99,7 @@ export { default as ProgressStep } from "./ProgressIndicator/ProgressStep";
|
|||
export { default as RadioButton } from "./RadioButton/RadioButton";
|
||||
export { default as RadioButtonSkeleton } from "./RadioButton/RadioButtonSkeleton";
|
||||
export { default as RadioButtonGroup } from "./RadioButtonGroup/RadioButtonGroup";
|
||||
export { default as RecursiveList } from "./RecursiveList/RecursiveList";
|
||||
export { default as Search } from "./Search/Search";
|
||||
export { default as SearchSkeleton } from "./Search/SearchSkeleton";
|
||||
export { default as Select } from "./Select/Select";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue