Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Storefron adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrgrundas committed Jan 4, 2019
1 parent ace8c66 commit 74d4dc4
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/components/App/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $turquoise-light: #f1f5f5;
$turquoise: #51e9d2;
$white: #fff;

$blue-overlay: rgba($blue, 0.8);
$blue-overlay: rgba($blue, 0.15);

// typography
$base-font-family: "montserrat";
Expand Down
6 changes: 3 additions & 3 deletions src/components/MainMenu/MainMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { mediumScreen, smallScreen } from "../App/scss/variables.scss";
import "./scss/index.scss";

import * as React from "react";
import Media from "react-media";
import { Link } from "react-router-dom";
Expand All @@ -14,9 +17,6 @@ import { UserContext } from "../User/context";
import NavDropdown from "./NavDropdown";
import { TypedMainMenuQuery } from "./queries";

import { mediumScreen, smallScreen } from "../App/scss/variables.scss";
import "./scss/index.scss";

const cartIcon = require("../../images/cart.svg");
const hamburgerHoverIcon = require("../../images/hamburger-hover.svg");
const hamburgerIcon = require("../../images/hamburger.svg");
Expand Down
6 changes: 0 additions & 6 deletions src/components/MainMenu/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@
line-height: 1rem;
transition: 0.3s;
}

&:hover {
span {
background-color: $turquoise;
}
}
}

&__user {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProductsFeatured/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { TypedFeaturedProductsQuery } from "./queries";
import "./scss/index.scss";

interface ProductsFeaturedProps {
title?: string;
title?: string | false;
}

const ProductsFeatured: React.SFC<ProductsFeaturedProps> = ({ title }) => {
Expand All @@ -24,7 +24,7 @@ const ProductsFeatured: React.SFC<ProductsFeaturedProps> = ({ title }) => {
return (
<div className="products-featured">
<div className="container">
<h3>{title}</h3>
{title !== false && <h3>{title}</h3>}
<Carousel>
{products.map(({ node: product }) => (
<Link
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectField/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import "./scss/index.scss";

import * as React from "react";
import Select from "react-select";
// tslint:disable
import { Props as SelectProps } from "react-select/lib/Select";

import "./scss/index.scss";

export interface SelectValue {
label: string;
value: string;
Expand Down
21 changes: 17 additions & 4 deletions src/components/SelectField/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,32 @@

&__menu-list {
box-shadow: $select-menu-shadow;
padding-bottom: 0;
padding-top: 0;

div {
padding: $spacer $spacer / 2;
margin: 0 $spacer;
padding: $spacer;
width: auto;
position: relative;

&:not(:last-child) {
border-bottom: 1px solid $gray;
&:not(:last-child)::after {
background-color: $gray;
bottom: 0;
content: "";
height: 1px;
left: $spacer / 2;
position: absolute;
width: calc(100% - #{$spacer});
}
}
}

&__option {
&:hover {
cursor: pointer;
background-color: rgba(33, 18, 94, 0.1);
}

&--is-focused {
background-color: $white;
}
Expand Down
18 changes: 14 additions & 4 deletions src/views/Home/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
text-align: center;
padding: 12rem 0;

&-text {
overflow: hidden;
}

@media (max-width: $small-screen) {
align-items: center;
display: flex;
Expand Down Expand Up @@ -74,12 +78,18 @@
grid-template-columns: 1fr;
grid-gap: 2rem;

@media (min-width: $medium-screen) {
grid-template-columns: 1fr 1fr 1fr;
}

@media (min-width: $small-screen) {
grid-template-columns: 1fr 1fr;

> div {
&:nth-child(3) {
grid-column: 3 / 1;
}

&:last-child {
display: none;
}
}
}

a {
Expand Down
6 changes: 5 additions & 1 deletion src/views/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export const SearchView: React.SFC<SearchViewProps> = ({
return (
<NetworkStatus>
{isOnline => (
<TypedSearchProductsQuery variables={variables} errorPolicy="all">
<TypedSearchProductsQuery
loaderFull
variables={variables}
errorPolicy="all"
>
{({ error, data, loading, loadMore }) => {
const canDisplayFilters = maybe(
() => !!data.attributes.edges.length
Expand Down

0 comments on commit 74d4dc4

Please sign in to comment.