@carbon/react
Version:
React components for the Carbon Design System
36 lines (35 loc) • 1.05 kB
TypeScript
/**
* 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, { type ComponentType, type FunctionComponent, ReactNode } from 'react';
interface ContainedListItemProps {
/**
* A slot for a possible interactive element to render within the item.
*/
action?: ReactNode;
/**
* The content of this item. Must not contain any interactive elements. Use props.action to include those.
*/
children?: ReactNode;
/**
* Additional CSS class names.
*/
className?: string;
/**
* Whether this item is disabled.
*/
disabled?: boolean;
/**
* Provide an optional function to be called when the item is clicked.
*/
onClick?: () => void;
/**
* A component used to render an icon.
*/
renderIcon?: ComponentType | FunctionComponent;
}
declare const ContainedListItem: React.FC<ContainedListItemProps>;
export default ContainedListItem;