Skip to content

Commit

Permalink
remove important from link variation of button (#1426)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyamccaskill committed Dec 11, 2023
1 parent dbac46f commit f03bc74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-design-system",
"comment": "remove important on transparent background of link variation of button",
"type": "patch"
}
],
"packageName": "pcln-design-system"
}
2 changes: 1 addition & 1 deletion packages/core/src/Button/Button.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ describe('Button', () => {
expect(button).toHaveStyleRule('font-weight', '500')
expect(button).toHaveStyleRule('line-height', '1.4')
expect(button).toHaveStyleRule('padding', '0px')
expect(button).toHaveStyleRule('background-color', 'transparent !important')
expect(button).toHaveStyleRule('color', theme.palette.primary.dark, {
modifier: ':hover',
})
Expand All @@ -355,6 +354,7 @@ describe('Button', () => {
expect(button).toHaveStyleRule('background-color', theme.palette.background.base, {
modifier: ':disabled',
})
expect(button).toHaveStyleRule('background-color', 'transparent')
})
})

Expand Down
9 changes: 6 additions & 3 deletions packages/core/src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@ export const TonalVariations: ButtonStory = {
),
}

export const TextButtons: ButtonStory = {
export const LinkVariation: ButtonStory = {
render: () => (
<StoryStage>
<Button variation='link'>Button</Button>
<Button variation='link'>Enabled</Button>
<Button variation='link' disabled>
Disabled
</Button>
<Button variation='link'>
<Text fontWeight='bold'>Button</Text>
<Text fontWeight='bold'>Bold</Text>
</Button>
</StoryStage>
),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const variations = {
line-height: ${(props) => props.theme.lineHeights.standard};
vertical-align: inherit;
padding: 0;
background-color: transparent !important;
background-color: transparent;
&:hover {
color: ${getPaletteColor('dark')};
text-decoration: underline;
Expand Down

0 comments on commit f03bc74

Please sign in to comment.