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:
Ashley Harrison
2023-07-17 16:12:09 +01:00
committed by GitHub
parent 9852b24d61
commit 626ac67dd7
171 changed files with 4583 additions and 4739 deletions

View File

@ -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',
},
});
};