mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 17:12:29 +08:00
Chore: Convert @grafana/ui
to use emotion object syntax (#71374)
* convert a bunch of grafana/ui to use emotion's object notation * convert some more grafana-ui emotion styles * more conversion * more conversion * finish conversion * fix unit tests * fix focus styles * remove semicolon from infobox story
This commit is contained in:
@ -191,11 +191,11 @@ export const getButtonStyles = (props: StyleProps) => {
|
||||
'&[disabled]': disabledStyles,
|
||||
}),
|
||||
disabled: css(disabledStyles),
|
||||
img: css`
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: ${theme.spacing(0, 1, 0, 0.5)};
|
||||
`,
|
||||
img: css({
|
||||
width: '16px',
|
||||
height: '16px',
|
||||
margin: theme.spacing(0, 1, 0, 0.5),
|
||||
}),
|
||||
icon: iconOnly
|
||||
? css({
|
||||
// Important not to set margin bottom here as it would override internal icon bottom margin
|
||||
@ -334,25 +334,25 @@ export function getPropertiesForVariant(theme: GrafanaTheme2, variant: ButtonVar
|
||||
}
|
||||
|
||||
export const clearButtonStyles = (theme: GrafanaTheme2) => {
|
||||
return css`
|
||||
background: transparent;
|
||||
color: ${theme.colors.text.primary};
|
||||
border: none;
|
||||
padding: 0;
|
||||
`;
|
||||
return css({
|
||||
background: 'transparent',
|
||||
color: theme.colors.text.primary,
|
||||
border: 'none',
|
||||
padding: 0,
|
||||
});
|
||||
};
|
||||
|
||||
export const clearLinkButtonStyles = (theme: GrafanaTheme2) => {
|
||||
return css`
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-family: inherit;
|
||||
color: inherit;
|
||||
height: 100%;
|
||||
&:hover {
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
`;
|
||||
return css({
|
||||
background: 'transparent',
|
||||
border: 'none',
|
||||
padding: 0,
|
||||
fontFamily: 'inherit',
|
||||
color: 'inherit',
|
||||
height: '100%',
|
||||
'&:hover': {
|
||||
background: 'transparent',
|
||||
color: 'inherit',
|
||||
},
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user