mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix more TypeScript errors (#36918)
* TypeScript: Fix some strict typescript errors * Fix more strict typescript errors * Few more fixes * Better string conversion * update check script to 195
This commit is contained in:
@@ -22,7 +22,7 @@ export interface Props<T> extends HTMLAttributes<HTMLButtonElement> {
|
||||
* @internal
|
||||
* A temporary component until we have a proper dropdown component
|
||||
*/
|
||||
export const ButtonSelect = React.memo(<T,>(props: Props<T>) => {
|
||||
const ButtonSelectComponent = <T,>(props: Props<T>) => {
|
||||
const { className, options, value, onChange, narrow, variant, ...restProps } = props;
|
||||
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||
const styles = useStyles2(getStyles);
|
||||
@@ -73,9 +73,11 @@ export const ButtonSelect = React.memo(<T,>(props: Props<T>) => {
|
||||
)}
|
||||
</ButtonGroup>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
ButtonSelect.displayName = 'ButtonSelect';
|
||||
ButtonSelectComponent.displayName = 'ButtonSelect';
|
||||
|
||||
export const ButtonSelect = React.memo(ButtonSelectComponent) as typeof ButtonSelectComponent;
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) => {
|
||||
return {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ColorSwatch } from '../ColorPicker/ColorSwatch';
|
||||
* */
|
||||
export interface ColorValueEditorProps {
|
||||
value?: string;
|
||||
onChange: (value?: string) => void;
|
||||
onChange: (value: string) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user