Skip to content

Commit

Permalink
feat: add upgrade button link (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWaldschmidt authored Jan 30, 2024
1 parent 6e58557 commit 1791213
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v2.0.3

- Adds link variant `upgrade-button`.

## v2.0.2

- Adds button variant `Upgrade`.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/ui-components",
"version": "2.0.2",
"version": "2.0.3",
"engines": {
"node": ">=20.2.0",
"npm": ">=10.2.0"
Expand Down
6 changes: 6 additions & 0 deletions src/components/Link/Link.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default {
options: [
'link',
'primary-button',
'upgrade-button',
'secondary-button',
'quiet-button',
'ghost-button',
Expand Down Expand Up @@ -92,6 +93,11 @@ StyledAsPrimaryButton.args = {
variant: 'primary-button',
content: 'I look like a button'
};
export const StyledAsUpgradeButton = Template.bind({});
StyledAsUpgradeButton.args = {
variant: 'upgrade-button',
content: 'I look like an upgrade button'
};

export const StyledAsSecondaryButton = Template.bind({});
StyledAsSecondaryButton.args = {
Expand Down
8 changes: 8 additions & 0 deletions src/components/Link/Link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
'bg-black text-white hover:bg-gray-700 hover:text-white active:bg-gray-800 focus:bg-gray-800':
primaryButton
},
{
'bg-[#483AC5] text-white hover:bg-[#6C61D1] active:bg-[#483AC5] focus:bg-[#483AC5]':
upgradeButton
},
{
'bg-white text-gray-800 border border-gray-800 hover:bg-gray-50 hover:text-gray-800 focus:border-gray-800 active:bg-gray-100 focus:bg-gray-100':
secondaryButton
Expand Down Expand Up @@ -80,6 +84,7 @@ export default {
return [
'link',
'primary-button',
'upgrade-button',
'secondary-button',
'quiet-button',
'ghost-button',
Expand Down Expand Up @@ -142,6 +147,9 @@ export default {
primaryButton() {
return this.variant === 'primary-button';
},
upgradeButton() {
return this.variant === 'upgrade-button';
},
secondaryButton() {
return this.variant === 'secondary-button';
},
Expand Down

0 comments on commit 1791213

Please sign in to comment.