prettier fixes
This commit is contained in:
@@ -7,7 +7,5 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const AckButton: FC<Props> = ({ className, onClick }) => {
|
export const AckButton: FC<Props> = ({ className, onClick }) => {
|
||||||
return (
|
return <ActionButton className={className} icon="reply-all" tooltip="Acknowledge problem" onClick={onClick} />;
|
||||||
<ActionButton className={className} icon="reply-all" tooltip="Acknowledge problem" onClick={onClick} />
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ export const ActionButton: FC<PropsWithChildren<Props>> = ({ icon, width, toolti
|
|||||||
const buttonClass = cx(
|
const buttonClass = cx(
|
||||||
'btn',
|
'btn',
|
||||||
styles.button,
|
styles.button,
|
||||||
css`width: ${width || 3}rem`,
|
css`
|
||||||
className,
|
width: ${width || 3}rem;
|
||||||
|
`,
|
||||||
|
className
|
||||||
);
|
);
|
||||||
|
|
||||||
let button = (
|
let button = (
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ export const provideConfig = (component: React.ComponentType<any>) => {
|
|||||||
return ConfigProvider;
|
return ConfigProvider;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCurrentTheme = () => createTheme({
|
export const getCurrentTheme = () =>
|
||||||
|
createTheme({
|
||||||
colors: {
|
colors: {
|
||||||
mode: config.bootData.user.lightTheme ? 'light' : 'dark',
|
mode: config.bootData.user.lightTheme ? 'light' : 'dark',
|
||||||
},
|
},
|
||||||
@@ -23,7 +24,7 @@ export const getCurrentTheme = () => createTheme({
|
|||||||
export const ThemeProvider = ({ children }: { children: React.ReactNode }) => {
|
export const ThemeProvider = ({ children }: { children: React.ReactNode }) => {
|
||||||
return (
|
return (
|
||||||
<ConfigConsumer>
|
<ConfigConsumer>
|
||||||
{config => {
|
{(config) => {
|
||||||
return <ThemeContext.Provider value={getCurrentTheme()}>{children}</ThemeContext.Provider>;
|
return <ThemeContext.Provider value={getCurrentTheme()}>{children}</ThemeContext.Provider>;
|
||||||
}}
|
}}
|
||||||
</ConfigConsumer>
|
</ConfigConsumer>
|
||||||
|
|||||||
@@ -7,7 +7,5 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ExecScriptButton: FC<Props> = ({ className, onClick }) => {
|
export const ExecScriptButton: FC<Props> = ({ className, onClick }) => {
|
||||||
return (
|
return <ActionButton className={className} icon="terminal" tooltip="Execute script" onClick={onClick} />;
|
||||||
<ActionButton className={className} icon="terminal" tooltip="Execute script" onClick={onClick} />
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,13 +10,11 @@ export const GFHeartIcon: FC<Props> = ({ status, className }) => {
|
|||||||
const iconClass = cx(
|
const iconClass = cx(
|
||||||
className,
|
className,
|
||||||
'icon-gf',
|
'icon-gf',
|
||||||
{ "icon-gf-critical": status === 'critical' || status === 'problem' || status === 'warning'},
|
{ 'icon-gf-critical': status === 'critical' || status === 'problem' || status === 'warning' },
|
||||||
{ "icon-gf-online": status === 'online' || status === 'ok' },
|
{ 'icon-gf-online': status === 'online' || status === 'ok' }
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return <i className={iconClass}></i>;
|
||||||
<i className={iconClass}></i>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default GFHeartIcon;
|
export default GFHeartIcon;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export class ModalController extends React.Component<Props, State> {
|
|||||||
showModal = (component: React.ComponentType<any>, props: any) => {
|
showModal = (component: React.ComponentType<any>, props: any) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
component,
|
component,
|
||||||
props
|
props,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -281,7 +281,9 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
border-color: ${red};
|
border-color: ${red};
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
box-shadow: 0 0 0 2px ${theme.colors.bg1}, 0 0 0px 4px ${red};
|
box-shadow:
|
||||||
|
0 0 0 2px ${theme.colors.bg1},
|
||||||
|
0 0 0px 4px ${red};
|
||||||
`,
|
`,
|
||||||
inputHint: css`
|
inputHint: css`
|
||||||
display: inherit;
|
display: inherit;
|
||||||
|
|||||||
@@ -180,7 +180,9 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
border-color: ${red};
|
border-color: ${red};
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
box-shadow: 0 0 0 2px ${theme.colors.bg1}, 0 0 0px 4px ${red};
|
box-shadow:
|
||||||
|
0 0 0 2px ${theme.colors.bg1},
|
||||||
|
0 0 0px 4px ${red};
|
||||||
`,
|
`,
|
||||||
scriptCommandContainer: css`
|
scriptCommandContainer: css`
|
||||||
margin-bottom: ${theme.spacing.md};
|
margin-bottom: ${theme.spacing.md};
|
||||||
|
|||||||
Reference in New Issue
Block a user