Skip to content

Commit

Permalink
Remove unused styles
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rugh <[email protected]>
  • Loading branch information
sirugh committed Jan 22, 2020
1 parent 8302992 commit e7e0285
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,28 @@

.applyButton {
composes: root_normalPriority from '../../../Button/button.css';
align-self: center;
width: 2rem;

/* To match height of input in same row...*/
/* match the height of the input form. */
height: 2.25rem;
}

.errorMessage {
color: rgb(var(--venia-error));
}

/* on mobile... */
@media (max-width: 640px) {
.entryForm {
/* on mobile, switch to rows */
/* switch to rows. */
grid-template-columns: unset;
grid-template-rows: 1fr 1fr;
}

.applyButton {
composes: applyButton;
align-self: center;
/* center the button. */
justify-self: center;
}
}

/* Styles for "removal" view. */
.appliedCoupon {
font-size: 1rem;
}

.removeButton {
margin-left: 1rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { Fragment } from 'react';

import gql from 'graphql-tag';

Expand Down Expand Up @@ -105,8 +105,8 @@ const CouponCode = props => {
if (data.cart.applied_coupons) {
const codes = data.cart.applied_coupons.map(({ code }) => {
return (
<span className={classes.appliedCoupon} key={code}>
<span className={classes.code}>{code}</span>
<Fragment key={code}>
<span>{code}</span>
<button
className={classes.removeButton}
disabled={removingCoupon}
Expand All @@ -116,11 +116,11 @@ const CouponCode = props => {
>
Remove
</button>
</span>
</Fragment>
);
});

return <div className={classes.root}>{codes}</div>;
return <div>{codes}</div>;
} else {
return (
<Form className={classes.entryForm} onSubmit={handleApplyCoupon}>
Expand Down

0 comments on commit e7e0285

Please sign in to comment.