refactor: move outline style from inline to getSvgStyle CSS

- Move outline: 'none' from inline style prop to CSS styles
- Add outline: 'none' to all svgArg states (normal, highlighted, deemphasized)
- Addresses review feedback on code organization
This commit is contained in:
Abhijnya002
2026-01-06 19:11:51 -05:00
parent 45bdeefbdf
commit d46947ccb2
@@ -505,7 +505,6 @@ function PieSlice({
onKeyDown={shouldBeFocusable ? handleKeyDown : undefined}
onFocus={hasDataLinks ? handleFocus : undefined}
onBlur={hasDataLinks ? handleBlur : undefined}
style={{ outline: 'none' }}
data-testid={selectors.components.Panels.Visualization.PieChart.svgSlice}
>
<path d={pie.path({ ...arc })!} fill={fill} stroke={theme.colors.background.primary} strokeWidth={1} />
@@ -692,17 +691,20 @@ const getStyles = (theme: GrafanaTheme2) => {
}),
svgArg: {
normal: css({
outline: 'none',
[theme.transitions.handleMotion('no-preference')]: {
transition: 'all 200ms ease-in-out',
},
}),
highlighted: css({
outline: 'none',
[theme.transitions.handleMotion('no-preference')]: {
transition: 'all 200ms ease-in-out',
},
transform: 'scale3d(1.03, 1.03, 1)',
}),
deemphasized: css({
outline: 'none',
[theme.transitions.handleMotion('no-preference')]: {
transition: 'all 200ms ease-in-out',
},