Learn how to customize the theme and styles for popover components, the theme object for popover components has two main objects:
A. The defaultProps object for setting up the default value for props of popover component.
B. The styles object for customizing the theme and styles of popover component.
You can customize the theme and styles of popover components by adding Tailwind CSS classes as key paired values for objects.
interface PopoverStylesType {
defaultProps: {
placement: string;
offset:
| number
| {
mainAxis: number;
crossAxis: number;
alignmentAxis: number;
};
dismiss: {
enabled: boolean;
escapeKey: boolean;
referencePointerDown: boolean;
outsidePointerDown: boolean;
ancestorScroll: boolean;
bubbles: boolean;
};
animate: {
mount: object;
unmount: object;
};
className: string;
};
styles: {
base: object;
};
}import type { PopoverStylesType } from "@material-tailwind/react";const theme = {
popover: {
styles: {
base: {
bg: "bg-white",
color: "text-blue-gray-500",
},
},
},
};