Skip to content

Commit

Permalink
Design Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
okbel committed Oct 13, 2020
1 parent f5f8b15 commit 6978b4d
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 16 deletions.
6 changes: 4 additions & 2 deletions assets/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

:root {
--bg-primary: white;
--bg-primary-hover: rgba(0, 0, 0, 0.075);
--bg-primary-accent: #ddd;
--bg-secondary: black;
--bg-primary-accent: rgba(0, 0, 0, 0.075);

--text-primary: black;
--text-secondary: white;
Expand All @@ -14,7 +15,8 @@
[data-theme='dark'] {
--bg-primary: black;
--bg-secondary: white;
--bg-primary-accent: rgba(255, 255, 255, 0.075);
--bg-primary-hover: rgba(255, 255, 255, 0.075);
--bg-primary-accent: #111;

--text-primary: white;
--text-secondary: black;
Expand Down
2 changes: 1 addition & 1 deletion components/cart/CartItem/CartItem.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.quantity {
appearance: textfield;
@apply w-8 border-gray-300 border mx-3 rounded text-center text-sm;
@apply w-8 border-gray-300 border mx-3 rounded text-center text-sm text-black;
}

.quantity::-webkit-outer-spin-button,
Expand Down
6 changes: 3 additions & 3 deletions components/cart/CartItem/CartItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const CartItem = ({
return (
<li className="flex flex-row space-x-6 py-6">
<div className="h-12 w-12 bg-violet"></div>
<div className="flex-1 flex flex-col justify-between">
<span>{item.name}</span>
<div className="flex-1 flex flex-col justify-between text-primary">
<span className="font-bold mb-3">{item.name}</span>
<div className="flex items-center">
<button type="button" onClick={() => increaseQuantity(-1)}>
<Minus width={18} height={18} />
Expand All @@ -76,7 +76,7 @@ const CartItem = ({
</button>
</div>
</div>
<div className="flex flex-col justify-between space-y-2">
<div className="flex flex-col justify-between space-y-2 text-primary">
<span>{price}</span>
<button
className="flex justify-end"
Expand Down
2 changes: 1 addition & 1 deletion components/cart/CartSidebarView/CartSidebarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const CartSidebarView: FC = () => {
return (
<div
className={cn('h-full flex flex-col', {
'bg-black text-white': isEmpty,
'bg-white text-black': isEmpty,
'bg-red text-white': error,
'bg-green text-white': success,
})}
Expand Down
2 changes: 1 addition & 1 deletion components/icon/Minus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Minus = ({ ...props }) => {
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
<path
d="M5 12H19"
stroke="black"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
Expand Down
4 changes: 2 additions & 2 deletions components/icon/Plus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ const Plus = ({ ...props }) => {
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
<path
d="M12 5V19"
stroke="black"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M5 12H19"
stroke="black"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
Expand Down
2 changes: 1 addition & 1 deletion components/product/Swatch/Swatch.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.root:hover {
@apply transform scale-110 bg-primary-accent;
@apply transform scale-110 bg-primary-hover;
}

.colorViolet {
Expand Down
2 changes: 1 addition & 1 deletion components/ui/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props {
}

const Hero: FC<Props> = ({ headline, description, className }) => {
const rootClassName = cn('bg-black py-12 px-4 md:px-6', className)
const rootClassName = cn('bg-black py-12', className)
return (
<div className={rootClassName}>
<Container>
Expand Down
4 changes: 2 additions & 2 deletions components/ui/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const Logo = () => (
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="32" height="32" rx="16" fill="black" />
<rect width="32" height="32" rx="16" fill="var(--bg-secondary)" />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M17.6482 10.1305L15.8785 7.02583L7.02979 22.5499H10.5278L17.6482 10.1305ZM19.8798 14.0457L18.11 17.1983L19.394 19.4511H16.8453L15.1056 22.5499H24.7272L19.8798 14.0457Z"
fill="white"
fill="var(--bg-primary)"
/>
</svg>
)
Expand Down
2 changes: 1 addition & 1 deletion components/wishlist/WishlistCard/WishlistCard.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.root {
@apply grid grid-cols-12 w-full gap-6 px-3 py-6 border-b border-primary-accent;
@apply grid grid-cols-12 w-full gap-6 px-3 py-6 border-b border-primary-hover;

&:nth-child(3n + 1) {
& .productBg {
Expand Down
2 changes: 1 addition & 1 deletion components/wishlist/WishlistCard/WishlistCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const WishlistCard: FC<Props> = ({ className, data }) => {
<p className="mb-4">
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.
</p>
<button className="py-1 px-3 border border-secondary rounded-md shadow-sm">
<button className="py-1 px-3 border border-secondary rounded-md shadow-sm hover:bg-primary-hover">
Add to cart
</button>
</div>
Expand Down
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
'accent-1': '#FAFAFA',
'accent-2': '#F1F3F5',
'accent-4': '#888',
'accent-8': '#111111',
violet: '#7928CA',
pink: '#FF0080',
cyan: '#50E3C2',
Expand All @@ -26,6 +27,7 @@ module.exports = {
primary: 'var(--bg-primary)',
secondary: 'var(--bg-secondary)',
'primary-accent': 'var(--bg-primary-accent)',
'primary-hover': 'var(--bg-primary-accent)',
},
textColor: {
base: 'var(--text-primary)',
Expand Down

0 comments on commit 6978b4d

Please sign in to comment.