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