infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
63 lines • 1.88 kB
TypeScript
import * as React from "react";
declare const listItemVariants: (props?: ({
variant?: "default" | "primary" | "negative" | "bordered" | null | undefined;
isDisabled?: boolean | null | undefined;
isSelected?: boolean | null | undefined;
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
export interface ListItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
/**
* Type of list item - determines if checkbox is shown
*/
type?: "single" | "multiple";
/**
* Leading icon to display on the left
*/
leadingIcon?: React.ReactNode;
/**
* Title text (required)
*/
title: string;
/**
* Description text (optional)
*/
description?: string;
/**
* Trailing icon to display on the right
*/
trailingIcon?: React.ReactNode;
/**
* Whether to show the default chevron trailing icon
*/
showChevron?: boolean;
/**
* Visual variant of the list item
*/
variant?: "default" | "bordered" | "primary" | "negative";
/**
* Whether the list item is disabled
*/
isDisabled?: boolean;
/**
* Whether the list item is selected (for multiple type)
*/
isSelected?: boolean;
/**
* Callback when the list item selection changes
*/
onSelectionChange?: (selected: boolean) => void;
/**
* Size of the checkbox (when type is multiple)
*/
checkboxSize?: "small" | "medium" | "large";
/**
* Custom class name for the container
*/
containerClassName?: string;
/**
* Custom class name for the content area
*/
contentClassName?: string;
}
declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLDivElement>>;
export { ListItem, listItemVariants };
//# sourceMappingURL=ListItem.d.ts.map