Skip to content

Commit b0561d7

Browse files
Refactor PrintButton component to use SvgDocument and simplify button styles
1 parent b2a0c52 commit b0561d7

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

dotcom-rendering/src/components/PrintButton.island.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { css } from '@emotion/react';
2-
import { Button, SvgShareWeb } from '@guardian/source/react-components';
2+
import { Button, SvgDocument } from '@guardian/source/react-components';
33
import { palette as themePalette } from '../palette';
44

5-
const buttonStyles = (sizeXSmall: boolean) => css`
5+
const buttonStyles = css`
66
transition: none;
77
border: 1px solid ${themePalette('--share-button-border')};
88
color: ${themePalette('--share-button')};
9-
padding: ${sizeXSmall && '0 10px'};
109
svg {
1110
fill: ${themePalette('--share-button')};
1211
}
@@ -18,6 +17,9 @@ const buttonStyles = (sizeXSmall: boolean) => css`
1817
fill: ${themePalette('--share-button-hover')};
1918
}
2019
}
20+
:focus {
21+
outline: 0 !important;
22+
}
2123
`;
2224

2325
/**
@@ -33,8 +35,8 @@ export const PrintButton = () => {
3335
type="button"
3436
priority="tertiary"
3537
iconSide="left"
36-
icon={<SvgShareWeb />}
37-
cssOverrides={css([buttonStyles(true)])}
38+
icon={<SvgDocument />}
39+
cssOverrides={css(buttonStyles)}
3840
>
3941
Print version
4042
</Button>

0 commit comments

Comments
 (0)