-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
108 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import React from 'react'; | ||
// These are currently not officially exposed, so we import them directly | ||
import parseColor from 'polished/lib/internalHelpers/_parseColorString' | ||
import rgbToHsl from 'polished/lib/internalHelpers/_rgbToHsl' | ||
import hslToHex from 'polished/lib/internalHelpers/_hslToHex' | ||
import parseColor from 'polished/lib/internalHelpers/_parseColorString'; | ||
import rgbToHsl from 'polished/lib/internalHelpers/_rgbToHsl'; | ||
import hslToHex from 'polished/lib/internalHelpers/_hslToHex'; | ||
|
||
import Tile from '../Tile'; | ||
import { Wrapper } from './style'; | ||
|
||
export default ({ color }) => { | ||
const base = rgbToHsl(parseColor(color)); | ||
return ( | ||
<Wrapper> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.1)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.3)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.5)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.7)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.9)} /> | ||
</Wrapper> | ||
) | ||
} | ||
const base = rgbToHsl(parseColor(color)); | ||
return ( | ||
<Wrapper> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.1)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.3)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.5)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.7)} /> | ||
<Tile color={hslToHex(base.hue, base.saturation, 0.9)} /> | ||
</Wrapper> | ||
); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ export const Wrapper = styled.div` | |
@media screen and (max-aspect-ratio: 2/3) { | ||
flex-direction: column; | ||
} | ||
` | ||
`; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ injectGlobal` | |
@media screen and (min-aspect-ratio: 2/3) { | ||
overflow: hidden; | ||
} | ||
` | ||
`; |
This file contains 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