Skip to content

Merging new navbar and tooltips into master #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 113 commits into from
May 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
276999c
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
f38f6f3
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 18, 2016
7d483dd
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
21841c8
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
5e48271
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
99294b8
Merge pull request #41 from appirio-tech/feature/bundle-navbar-component
Mar 18, 2016
aab6f64
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
19f86a9
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 18, 2016
01d6a7b
AS#102852633435507, Create Carousel React component
Mar 22, 2016
dab88ea
AS#102852633435507, Create Carousel React component
Mar 22, 2016
3912480
AS#101448607854424, Create Sub Navigation React component
Mar 22, 2016
04d7a69
AS#101448607854424, Create Sub Navigation React component
Mar 22, 2016
f79989b
AS#101448607854424, Create Sub Navigation React component
Mar 22, 2016
79e80c2
AS#101448607854424, Create Sub Navigation React component
Mar 23, 2016
2cfe86c
AS#101967871059519, Bundle NavBar components to be used by tc-site
Mar 23, 2016
ec3272c
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 23, 2016
1ce9ec2
Merge pull request #43 from appirio-tech/feature/bundle-navbar-component
Mar 23, 2016
1043593
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 23, 2016
43a90b6
Merge pull request #44 from appirio-tech/feature/bundle-navbar-component
Mar 23, 2016
23186cf
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 23, 2016
d1e89ac
Merge pull request #45 from appirio-tech/feature/bundle-navbar-component
Mar 23, 2016
0215bb4
NavBar miscellaneous fixes/improvements
Mar 23, 2016
5561415
AS#103506492417787, Add username as property for NavBar
Mar 24, 2016
4fc78d5
AS#103506492417790, Adjust UserDropdownMenu component to determine lo…
Mar 24, 2016
141a16d
Fixed lint errors
Mar 24, 2016
a3df823
AS#103506492417792, Support hyperlinks in StandardListItem component
Mar 24, 2016
1aa0ae4
AS#104536643797659, Update QuickLinks component to use hyperlinks wit…
Mar 24, 2016
dbd714d
AS#104536643797659, Update QuickLinks component to use hyperlinks wit…
Mar 24, 2016
a213fc7
Merge pull request #46 from appirio-tech/feature/misc-fixes
Mar 24, 2016
1d9d683
Merge branch 'dev' into feature/subnav-component
Mar 24, 2016
97e2747
Merge pull request #47 from appirio-tech/feature/subnav-component
Mar 24, 2016
827e86b
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 24, 2016
34e6a1c
Merge pull request #48 from appirio-tech/feature/bundle-navbar-component
Mar 24, 2016
62120e5
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 24, 2016
a861dd7
Merge pull request #49 from appirio-tech/feature/bundle-navbar-component
Mar 24, 2016
7609f53
AS#102481437698830, Travis build to push bundle to S3/CDN
Mar 24, 2016
89953b9
AS#105182014672648, Non logged in state style fix for user dropdown
Mar 28, 2016
8d70c8f
Merge branch 'dev' into feature/misc-fixes
Mar 28, 2016
ba7188b
AS#105182014672642, Use real links for user dropdown menu
Mar 28, 2016
be1b1c4
AS#105182014672642, Use real links for user dropdown menu
Mar 28, 2016
ef3207f
Merge pull request #55 from appirio-tech/feature/misc-fixes
Mar 29, 2016
b01cfbc
AS#105182014672638, Integrate Search APIs with NavBar
Mar 30, 2016
682fe0b
AS#105182014672638, Integrate Search APIs with NavBar
Mar 30, 2016
10c0905
Merge branch 'master' into dev
Mar 30, 2016
fae8437
Merge branch 'dev' into feature/misc-fixes
Mar 31, 2016
66b0e3a
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
9569f71
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
954a38c
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
5180734
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
6860aca
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
737669c
AS#105182014672640, Use real icons for NavBar components
Mar 31, 2016
e900474
Merge pull request #60 from appirio-tech/feature/misc-fixes
Mar 31, 2016
75aebd2
Merge branch 'master' into dev
Mar 31, 2016
d50932b
Fixed master merge conflicts
Mar 31, 2016
ba9e6cd
Merge pull request #61 from appirio-tech/feature/misc-fixes
Mar 31, 2016
758838c
Fixing build error
Mar 31, 2016
89737c2
Merge pull request #62 from appirio-tech/feature/misc-fixes
Mar 31, 2016
5cdfbc5
AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
8f0909e
Merge pull request #63 from appirio-tech/feature/misc-fixes
Apr 1, 2016
dcaa3db
AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
d8a796a
Merge pull request #64 from appirio-tech/feature/misc-fixes
Apr 1, 2016
555dc0f
\AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
3e4b5ba
Merge pull request #65 from appirio-tech/feature/misc-fixes
Apr 1, 2016
2a55233
AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
2b4219f
AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
4334624
Merge pull request #66 from appirio-tech/feature/misc-fixes
Apr 1, 2016
edebd1d
AS#102852633435494, Integrate new NavBar into topcoder-app
Apr 1, 2016
587f8fc
Merge pull request #67 from appirio-tech/feature/misc-fixes
Apr 1, 2016
084db5c
AS#105182014672642, Use real links for user dropdown menu
Apr 1, 2016
8d39fd4
Merge pull request #69 from appirio-tech/feature/misc-fixes
Apr 1, 2016
e781de0
Merge branch 'master' into dev
Apr 4, 2016
70aa762
Removing copy of index.html to dist folder for build nav bar target. …
Apr 4, 2016
afdbf11
AS#108326934861720, Add QA and Prod builds for react-components
Apr 5, 2016
066d20f
Merge branch 'master' into dev
Apr 5, 2016
bbeb125
AS#108326934861724, Add loading state to the search bar component
Apr 5, 2016
f111805
Used classnames module for SearchSuggestions component
Apr 5, 2016
ffb40a6
AS#108326934861724, Add loading state to the search bar component
Apr 5, 2016
f5c0e17
Merge pull request #75 from appirio-tech/feature/loading-state-for-se…
Apr 5, 2016
1839963
Merge pull request #74 from appirio-tech/feature/qa-prod-travis-build
Apr 6, 2016
7ebc4a4
AS#102481437698833, Add NavBar react component to tc-site
Apr 6, 2016
f909942
AS#102481437698833, Add NavBar react component to tc-site
Apr 6, 2016
4c00831
AS#102481437698833, Add NavBar react component to tc-site
Apr 7, 2016
37b9706
Trying set correct NODE_ENV for build to get full source code for deb…
Apr 7, 2016
fcb564d
Trying set correct NODE_ENV for build to get full source code for deb…
Apr 7, 2016
fd91047
AS#102481437698833, Add NavBar react component to tc-site
Apr 7, 2016
d2457a7
Trying set correct NODE_ENV for build to get full source code for deb…
Apr 7, 2016
19ea7c0
Trying set correct NODE_ENV for build to get full source code for deb…
Apr 7, 2016
caee027
AS#109666937826887, Add search callback on selection/enter of search …
Apr 8, 2016
f0dd7e7
AS#109666937826887, Add search callback on selection/enter of search …
Apr 8, 2016
b0c3a85
Merge branch 'master' into dev
Apr 9, 2016
1837558
Merge branch 'master' into dev
Apr 11, 2016
a176047
AS#109666937826887, Add search callback on selection/enter of search …
Apr 11, 2016
7ae24dc
AS#110774117957300, Improve logic for handling multiple requests in S…
Apr 11, 2016
9702cdf
AS#110774117957300, Improve logic for handling multiple requests in S…
Apr 12, 2016
340d8e4
AS#102481437698833, Add NavBar react component to tc-site
Apr 12, 2016
46ad980
AS#102481437698833, Add NavBar react component to tc-site
Apr 12, 2016
2777646
SearchBar style fix to avoid css override in calling app.
Apr 12, 2016
efd5b13
Solution for avoiding css conflicts especially with name of container.
Apr 12, 2016
a92615d
AS#111383418066580, Autocomplete the search text on forward arrow key
Apr 12, 2016
a7c219e
AS#111383418066580, Autocomplete the search text on forward arrow key
Apr 12, 2016
97c9087
AS#111383418066583, Support arrow navigation for moving between sugge…
Apr 13, 2016
0e6bedf
AS#111383418066583, Support arrow navigation for moving between sugge…
Apr 14, 2016
b06194f
Merge pull request #80 from appirio-tech/feature/fix-loader-css-conflict
Apr 14, 2016
eeab780
Merge pull request #81 from appirio-tech/feature/forward-arrow-key-au…
Apr 14, 2016
45b33ba
AS#109666937826878, Add logic for selected menu item in MenuBar
Apr 14, 2016
72c2f27
AS#109666937826878, Add logic for selected menu item in MenuBar
Apr 14, 2016
5de4a19
AS#111383418066580, Autocomplete the search text on forward arrow key
Apr 22, 2016
988fae3
AS#113534192025964, Trim search value in SearchBar
Apr 22, 2016
dc29bed
AS#113534202832110, Add type being "search" for search input box in S…
Apr 22, 2016
37661f5
AS#113534192025965, Autofill the search term, from query string, in S…
Apr 22, 2016
18bc3a7
AS#113534192025965, Autofill the search term, from query string, in S…
Apr 22, 2016
9f46361
AS#113534192025965, Autofill the search term, from query string, in S…
Apr 22, 2016
e3e59f2
AS#113534202832110, Add type being "search" for search input box in S…
Apr 22, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ coverage
.idea
.env
npm-debug.log
.DS_Store
.DS_Store
dist
56 changes: 54 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
language: node_js
node_js:
- 5.2.0
- 5.5.0
install:
- npm install
before_script:
chmod +x setenv.sh && ./setenv.sh
script:
- npm run lint
- npm run lint && npm run build-navbar
sudo: false
before_deploy:
- npm-prepublish --verbose
Expand All @@ -14,9 +16,59 @@ deploy:
api_key: "$NPM_API_KEY"
on:
tags: true
- provider: s3
cache_control: private, no-store, no-cache, must-revalidate, max-age=0
detect_encoding: true
access_key_id: "$AWS_KEY"
secret_access_key: "$AWS_SECRET"
bucket: components.topcoder-dev.com
skip_cleanup: true
local_dir: dist
on:
branch: dev
- provider: s3
cache_control: private, no-store, no-cache, must-revalidate, max-age=0
detect_encoding: true
access_key_id: "$QA_AWS_KEY"
secret_access_key: "$QA_AWS_SECRET"
bucket: components.topcoder-qa.com
skip_cleanup: true
local_dir: dist
on:
branch: release
- provider: s3
cache_control: private, no-store, no-cache, must-revalidate, max-age=0
detect_encoding: true
access_key_id: "$PROD_AWS_KEY"
secret_access_key: "$PROD_AWS_SECRET"
bucket: components.topcoder.com
skip_cleanup: true
local_dir: dist
on:
branch: master
env:
matrix:
- CXX=g++-4.8
global:
# NPM_EMAIL
- secure: "kmo0afPY5HwJ5SryNY0XRRRekxd1teBR6lSiw2jtjU64sOdpjN7ZhGWy9q0lReGk6hloPfXewXRlpCbcDRFoxvJUdAbQoAN8gq/BxrwGmWlBepgUew1O6WLkpvqXCMe6lUmPEznjil2anjLHfm/cKiqwaY1n8MI+PSna6eNwAlffx72uPL1TzrijJjb7kKqTtjTHZzNiiUn2jZrc35G+MeryZmnd5xXV7cXgYb+flEMC5sDqhcO2aewYiCGMK2b3f7QDJFbGD4+v+HjN1XispJgCxDLTRLJ0HD8HPj87w/7s7PHqCuRUwga1Z2HTRDniqM7mb7TZ5RK990Olp4d1Fw/ApXhUEe4fwgTdN9PSwOzOrY4VGNyytYvJuMVqSVGIHx6Y2BuCt3gzPeM0ev8bjhE9PItYmDTr5FhNI1XLT7PKu+Ktp72bmdEVqNfnv7jXRKba9AeSBQVk70jKMpYAuGI/d/xXeaD2vImBhCflc0UArYfXf+JYMEwzhiMZQfq6csvg0UV/nlD9xidgBLt8QUGdFaQTjsQLt9CWbwcKM7/yFcfkOKEHrM5By1Do4gtSDxmK5F+81210YMO30OVwllHk/f+jOspti9EJv6r0vAZOkKXXL15VsyKQSrF/p6k+brVf0cQcnUMiSiNsl/aEftNW2ys5VCIRJcEol5bHt90="
# NPM_API_KEY
- secure: "O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+0+aH6OwZ6WyylDeyZtwtoq+pnB6uXKlhEnQiz8NmrgI7P92DomX2Dd70AAjrfDpCAbJCQvowLOoO9zkEyyN1c8JQnhA3TJQFfw81WEeh9GBShMyhfD+y3tnpllb4vUdYHYMHE7wEUl7RMjVtFg538V+pEyk/1tXTf+Tvb/ZuazsXCRyzLVZQyXKP0U6SVNsZCu5SZR4Pb2F0JH8PO0p/wRrUoUrHnd7b0yieIlrTAVS5VGeBs1bTG+fgta09mllo0WxedaDoxQGYl9YrOK09EPbjFGJemp/Q9uKoSWymNrkgggMgZlq2CdL/QFbWUfWqhRs9/BWnh4SuQsUW5tsE99qxbFYC1kfuJwR2g8jN3HWAeV37BWC3ct3f5+oOKIgaKQmk2+lH9Z7kII+QOCt10kM21IF5RxZjhvg6AxoORjoRt8Dia+iMSbW1fnU9QCmSC5S0Vvccynjl9ldnPUHOpjEVaoqQOV/6cUlAEw82ySOakyzYpdS8l5DrLwt2Ik3fQhoIgXQe6l1FabGy6ZixcXqoMnDJJh04rUwUD6Tyzn0PZJp3KziDHJMg/BJSTKXmgODRyV2cGxoqbfy8g="
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
121 changes: 121 additions & 0 deletions components/Carousel/Carousel.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
require('./Carousel.scss')
import classNames from 'classnames'

import React, { Component } from 'react'
import ReactDOM from 'react-dom'

import LeftArrowIcon from '../Icons/LeftArrowIcon'
import RightArrowIcon from '../Icons/RightArrowIcon'

export default class Carousel extends Component {
componentWillMount() {
this.handleResize = this.handleResize.bind(this)
window.addEventListener('resize', this.handleResize)
this.handlePageUp = this.handlePageUp.bind(this)
this.handlePageDown = this.handlePageDown.bind(this)
this.setState({firstVisibleItem: this.props.firstVisibleItem || 0})
}

componentWillUnmount() {
window.removeEventListener('resize', this.handleResize)
}

handleResize() {
this.validatePagers()
}

componentDidMount() {
this.validatePagers()
}

componentDidUpdate() {
this.validatePagers()
}

validatePagers() {
const pageDownClass = classNames(
'page-down',
{ hidden: this.state.firstVisibleItem === 0 }
)
const pageUpClass = classNames(
'page-up',
{ hidden: this.lastElementVisible(this.state.firstVisibleItem) }
)
const node = ReactDOM.findDOMNode(this)
const pageDownNode = node.querySelector('.page-down')
const pageUpNode = node.querySelector('.page-up')
pageDownNode.className = pageDownClass
pageUpNode.className = pageUpClass
}


lastElementVisible(firstVisibleItem) {
const node = ReactDOM.findDOMNode(this)
const parentNode = node.parentNode
const maxWidth = parentNode.getBoundingClientRect().width
const visibleAreaNode = node.querySelector('.visible-area')
visibleAreaNode.style.width = maxWidth + 'px'
const itemNodes = visibleAreaNode.children
let width = 0
if (firstVisibleItem > 0) {
// if first item is not visible, account 20px for page-down element
width += 20
// account the right margin for page-down (see Carousel.scss)
width += 15
}
for (let i = 0; i < itemNodes.length; i++) {
const itemNode = itemNodes[i]
width += itemNode.getBoundingClientRect().width
if (i < itemNodes.length - 1) {
// account 30px for every carousel-item (see Carousel.scss)
width += 30
}
if (width > maxWidth) {
return false
}
}
return true
}

handlePageUp() {
if (!this.lastElementVisible(this.state.firstVisibleItem + 1)) {
const nextFirstVisibleItem = this.state.firstVisibleItem + 1
this.setState({firstVisibleItem: nextFirstVisibleItem})
}
}

handlePageDown() {
if (this.state.firstVisibleItem > 0) {
const nextFirstVisibleItem = this.state.firstVisibleItem - 1
this.setState({firstVisibleItem: nextFirstVisibleItem})
}
}

render() {
const carouselItem = (item, idx) => {
if (idx < this.state.firstVisibleItem) {
return
}

return (
<div key={idx} className="carousel-item">
{item}
</div>
)
}

return (
<div className="Carousel">
<div className="page-down" onClick={this.handlePageDown}>
<LeftArrowIcon fill="#FFFFFF" />
</div>
<div className="visible-area">
{ this.props.children.map(carouselItem) }
</div>
<div className="page-up" onClick={this.handlePageUp}>
<RightArrowIcon fill="#FFFFFF" />
</div>
</div>
)
}
}
45 changes: 45 additions & 0 deletions components/Carousel/Carousel.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import 'topcoder/tc-includes';

$pager-bg-color: #737380;

.Carousel {
display: flex;
flex-direction: row;

.page-down {
width: 20px;
margin-right: 15px;
background-color: $pager-bg-color;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;

&.hidden {
display: none;
}
}

.page-up {
width: 20px;
background-color: $pager-bg-color;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;

&.hidden {
display: none;
}
}

.visible-area {
display: flex;
flex-direction: row;
overflow: hidden;

.carousel-item:not(:first-child) {
margin-left: 30px;
}
}
}
39 changes: 39 additions & 0 deletions components/Carousel/CarouselExamples.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react'
import Carousel from './Carousel'

import StandardListItem from '../StandardListItem/StandardListItem'

require('./CarouselExamples.scss')


const CarouselExamples = () => (

<div className="CarouselExamples">
<p>With limited width</p>
<div className="limited-width">
<Carousel>
<StandardListItem labelText="Community" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Compete" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Learn" imgSrc={require('./placeholder.svg')} />
</Carousel>
</div>
<p>With full width</p>
<div className="full-width">
<Carousel>
<StandardListItem labelText="Community" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Compete" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Learn" imgSrc={require('./placeholder.svg')} />
</Carousel>
</div>
<p>With limited width and custom first visible element</p>
<div className="limited-width">
<Carousel firstVisibleItem={1}>
<StandardListItem labelText="Community" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Compete" imgSrc={require('./placeholder.svg')} />
<StandardListItem labelText="Learn" imgSrc={require('./placeholder.svg')} />
</Carousel>
</div>
</div>
)

module.exports = CarouselExamples
17 changes: 17 additions & 0 deletions components/Carousel/CarouselExamples.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@import 'topcoder/tc-includes';

.Carousel {
.StandardListItem {
padding: 0px;
}
}

.CarouselExamples {
> p {
border: 1px solid $accent-gray;
margin: 20px 0px;
}
.limited-width {
width: 200px;
}
}
4 changes: 4 additions & 0 deletions components/Carousel/placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions components/Icons/HamburgerIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'

const HamburgerIcon = ({ width, height, stroke }) => {
const s = (stroke || '#A3A3AE')
return (
<svg width={ width || '22px' } height={ height || '16px' } viewBox="0 0 22 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>ico-hamburger</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Scaling" stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd" strokeLinecap="round" strokeLinejoin="round">
<g id="Components---Mobile" transform="translate(-1379.000000, -434.000000)" stroke={ s } strokeWidth="2">
<g id="ico-mobile-menu-default" transform="translate(1380.000000, 434.000000)">
<path d="M0,8 L20,8" id="Stroke-5456"></path>
<path d="M0,1 L20,1" id="Stroke-5460"></path>
<path d="M0,15 L20,15" id="Stroke-5461"></path>
</g>
</g>
</g>
</svg>
)
}

export default HamburgerIcon
19 changes: 19 additions & 0 deletions components/Icons/LeftArrowIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'

const LeftArrowIcon = ({ width, height, fill }) => {
const f = (fill || '#A3A3AE')
return (
<svg width={ width || '12px' } height={ height || '19px' } viewBox="0 0 12 19" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>ico-arrow-big-left</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="ASSETS-EXPORT" stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd">
<g id="Assets" transform="translate(-950.000000, -252.000000)" fill={ f }>
<path d="M959.025853,261.50145 L951.137711,253.305117 C950.841671,253.006868 950.841671,252.524146 951.137711,252.223687 C951.433751,251.925438 951.912055,251.925438 952.208095,252.223687 L960.857325,260.959078 C961.153365,261.258432 961.153365,261.742258 960.857325,262.040508 L952.208095,270.775899 C951.912055,271.075253 951.433751,271.074148 951.137711,270.775899 C950.841671,270.478754 950.841671,269.994927 951.137711,269.694469 L959.025853,261.50145 L959.025853,261.50145 Z" id="ico-arrow-big-left" transform="translate(955.997518, 261.500000) scale(-1, 1) translate(-955.997518, -261.500000) "></path>
</g>
</g>
</svg>
)
}

export default LeftArrowIcon
21 changes: 21 additions & 0 deletions components/Icons/MagnifyGlassIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react'

const MagnifyGlassIcon = ({ width, height, stroke }) => {
const s = (stroke || '#A3A3AE')
return (
<svg width={ width || '22px' } height={ height || '22px' } viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>ico-magnify</title>
<defs></defs>
<g id="Scaling" stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd" strokeLinecap="round" strokeLinejoin="round">
<g id="Components---Mobile" transform="translate(-1327.000000, -432.000000)" stroke={ s } strokeWidth="2">
<g id="ico-mobile-search-default" transform="translate(1328.000000, 433.000000)">
<path d="M20,20 L14.632381,14.632381" id="Stroke-5191"></path>
<path d="M0,8.57142857 C0,3.83714286 3.83714286,0 8.57142857,0 C13.3057143,0 17.1428571,3.83714286 17.1428571,8.57142857 C17.1428571,13.3057143 13.3057143,17.1428571 8.57142857,17.1428571 C3.83714286,17.1428571 0,13.3057143 0,8.57142857 L0,8.57142857 Z" id="Stroke-5192"></path>
</g>
</g>
</g>
</svg>
)
}

export default MagnifyGlassIcon
12 changes: 12 additions & 0 deletions components/Icons/PlaceholderIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'

const PlaceholderIcon = ({ width, height, fill }) => {
const f = (fill || '#B47DD6')
return (
<svg width={ width || '32px' } height={ height || '32px' } viewBox="0 0 32 32">
<rect width="32" height="32" fill={ f }></rect>
</svg>
)
}

export default PlaceholderIcon
Loading