export interface DatGuiProps {
data: any; // The data your dat.GUI controller will mutate
onUpdate: (data: any) => any; // The method which will be called whenever an update is handled by the controller
children: any; // The dat.GUI components that make up the controller
liveUpdate?: boolean; // Determines if live updates should occur, defaults to true
labelWidth?: number; // The width of the labels in pixels, defaults to 40
className?: string; // The class name to set on the DatGui div
style?: StyleSheet; // The style object to set on the DatGui div
}
But source declares it as
style: PropTypes.object,
And latter is the expected type. I think this is an unintentional bug.
This is a temporary solution meanwhile:
const style = {
/* actual style */
position: "inherit",
/* below is to trick ts compiler into believing this is a StyleSheet instance*/
disabled: false,
href: null,
media: null!,
ownerNode: null!,
parentStyleSheet: null,
title: null,
type: "",
};
index.d.ts declares style as StyleSheet
But source declares it as
style: PropTypes.object,
And latter is the expected type. I think this is an unintentional bug.
This is a temporary solution meanwhile: