UNPKG

@carbon/react

Version:

React components for the Carbon Design System

46 lines (45 loc) 1.32 kB
/** * Copyright IBM Corp. 2022, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { ReactNode } from 'react'; import ContainedListItem from './ContainedListItem'; declare const variants: readonly ["on-page", "disclosed"]; export type ContainedListType = React.FC<ContainedListProps> & { ContainedListItem: typeof ContainedListItem; }; export type Variants = (typeof variants)[number]; export interface ContainedListProps { /** * A slot for a possible interactive element to render. */ action?: ReactNode; /** * A collection of ContainedListItems to be rendered in the ContainedList */ children?: ReactNode; /** * Additional CSS class names. */ className?: string; /** * Specify whether the dividing lines in between list items should be inset. */ isInset?: boolean; /** * The kind of ContainedList you want to display */ kind?: Variants; /** * A label describing the contained list. */ label?: string | ReactNode; /** * Specify the size of the contained list. */ size?: 'sm' | 'md' | 'lg' | 'xl'; } declare const ContainedList: ContainedListType; export default ContainedList;