Skip to content

Commit

Permalink
remove strikethru line and add image opacity to disabled megabutton s…
Browse files Browse the repository at this point in the history
…tate (#350)
  • Loading branch information
shannamurry committed Nov 2, 2022
1 parent c0b877f commit 19eb875
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 26 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 1.0.0-beta.65

### Features

Remove strikethru line from disabled `MegaButton`
Add image opacity to disabled `MegaButton`

## 1.0.0-beta.64

### Features
Expand Down
4 changes: 2 additions & 2 deletions 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": "1.0.0-beta.64",
"version": "1.0.0-beta.65",
"engines": {
"node": ">=14.18.2",
"npm": ">=8.3.0"
Expand Down
11 changes: 2 additions & 9 deletions src/components/MegaButton/MegaButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
<div
class="w-full"
>
<div
v-if="disabled && !disabledBanner"
data-testId="strikethru"
class="strikethru-line absolute top-0 h-full w-full"
/>
<div
v-if="imageSource"
data-testId="imageContainer"
Expand All @@ -55,7 +50,8 @@
<img
:class="[
'max-h-20 mx-auto',
{'!max-h-full' : topFullImage}
{'!max-h-full' : topFullImage},
{'opacity-60' : disabled}
]"
:src="imageSource"
:alt="imageAltText"
Expand Down Expand Up @@ -192,9 +188,6 @@ export default {
</script>

<style scoped lang="scss">
.strikethru-line {
background: linear-gradient(to top right, rgba(255, 255, 255, 0) calc(50% - 1px), #c4c4c4, rgba(255, 255, 255, 0) calc(50% + 1px));
}
label {
box-shadow: 0 4.32px 12.95px rgba(0, 0, 0, 0.08);
Expand Down
14 changes: 0 additions & 14 deletions src/components/MegaButton/__tests__/MegaButton.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,6 @@ describe('Megabutton', () => {
expect(label).toHaveClass('peer-disabled:cursor-not-allowed');
});

it('displays the strikethru line', () => {
const props = {
...megatextProps,
disabled: true
};

const { getByTestId } = render(MegaButton, {
props
});

const strikethruBox = getByTestId('strikethru');
expect(strikethruBox).toHaveClass('strikethru-line');
});

it('does not display a banner box', () => {
const props = {
...megatextProps,
Expand Down

0 comments on commit 19eb875

Please sign in to comment.