Created
July 25, 2018 16:38
-
-
Save josephcc/b4e84004bd62d28791e7ca8a0903ad1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (module.hot) { | |
console.log('Google content script HOT') | |
module.hot.accept() | |
} | |
import React from 'react' | |
import PureRenderMixin from 'react-addons-pure-render-mixin' | |
import pink from '@material-ui/core/colors/pink' | |
import purple from '@material-ui/core/colors/purple' | |
import indigo from '@material-ui/core/colors/indigo' | |
import lightBlue from '@material-ui/core/colors/lightBlue' | |
import teal from '@material-ui/core/colors/teal' | |
import lightGreen from '@material-ui/core/colors/lightGreen' | |
import yellow from '@material-ui/core/colors/yellow' | |
import orange from '@material-ui/core/colors/orange' | |
import brown from '@material-ui/core/colors/brown' | |
import Hotel from '@material-ui/icons/Hotel' | |
import Restaurant from '@material-ui/icons/Restaurant' | |
import LocalSee from '@material-ui/icons/LocalSee' | |
import Traffic from '@material-ui/icons/Traffic' | |
import Subway from '@material-ui/icons/Subway' | |
import Terrain from '@material-ui/icons/Terrain' | |
export default class { | |
static icons = [ | |
Terrain, | |
Hotel, | |
Restaurant, | |
LocalSee, | |
Traffic, | |
Subway | |
] | |
static iconNames = [ | |
'Terrain', | |
'Hotel', | |
'Restaurant', | |
'LocalSee', | |
'Traffic', | |
'Subway' | |
] | |
static colors = [ | |
pink, | |
purple, | |
indigo, | |
lightBlue, | |
teal, | |
lightGreen, | |
yellow, | |
orange, | |
brown | |
] | |
static shade = '300' | |
constructor() { | |
} | |
static getColors() { | |
return this.colors.map(c => c[this.shade]) | |
} | |
static getIcons() { | |
return this.icons | |
} | |
static getColor(i) { | |
return this.colors[i][this.shade] | |
} | |
static getIconName(i) { | |
return this.iconNames[i] | |
} | |
static getIconByName(iconName) { | |
return this.icons[this.iconNames.indexOf(iconName)] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment