Learn how to customize the theme and styles for collapse component, the theme object for collapse component has two main objects:
A. The defaultProps
object for setting up the default value for props of collapse component.
B. The styles
object for customizing the theme and styles of collapse component.
You can customize the theme and styles of collapse component by adding Tailwind CSS classes as key paired values for objects.
interface CollapseStylesType {
defaultProps: {
animate: {
mount: object;
unmount: object;
};
className: string;
};
styles: {
base: object;
};
}
import type { CollapseStylesType } from "@material-tailwind/react";
const theme = {
collapse: {
styles: {
base: {
backgroundColor: "bg-white",
borderRadius: "rounded-lg",
},
},
},
};