Learn how to customize the theme and styles for list component, the theme object for list component has two main objects:
A. The defaultProps
object for setting up the default value for props of list component.
B. The styles
object for customizing the theme and styles of list component.
You can customize the theme and styles of list component by adding Tailwind CSS classes as key paired values for objects.
interface ListStylesType {
defaultProps: {
ripple: boolean;
className: string;
};
styles: {
base: {
list: object;
item: {
initial: object;
selected: object;
disabled: object;
};
itemPrefix: object;
itemSuffix: object;
};
};
}
import { ListStylesType } from "@material-tailwind/react";
const theme = {
list: {
styles: {
base: {
list: {
bg: "bg-white",
},
},
},
},
};