-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from FredericHeem/photoshop-color-picker
Photoshop color picker
- Loading branch information
Showing
9 changed files
with
114 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import glamorous from "glamorous"; | ||
|
||
export default (context) => { | ||
export default context => { | ||
const { theme } = context; | ||
return glamorous('div')(() => ({ | ||
return glamorous("div")(() => ({ | ||
boxShadow: `2px 2px 2px 2px ${theme.palette.borderColor}`, | ||
padding: 10, | ||
margin: 20 | ||
padding: 20, | ||
margin: 10, | ||
"@media(max-width: 600px)": { | ||
margin: 0 | ||
} | ||
})); | ||
} | ||
}; |
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,17 +1,19 @@ | ||
import React from "react"; | ||
import paper from "components/Paper"; | ||
import alert from "./alert"; | ||
|
||
export default context => { | ||
const { tr } = context; | ||
const Paper = paper(context); | ||
const Alert = alert(context); | ||
return function AlertExamples() { | ||
return ( | ||
<div> | ||
<Paper> | ||
<h3>{tr.t("Alert")}</h3> | ||
<Alert.Danger type="danger" message="Alert danger" /> | ||
<Alert.Warning message="Alert warning" /> | ||
<Alert.Info message="Alert info message" title="My Title" code="500" /> | ||
</div> | ||
</Paper> | ||
); | ||
}; | ||
}; |
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,38 +1,50 @@ | ||
import React from "react"; | ||
import glamorous from "glamorous"; | ||
import button from "mdlean/lib/button"; | ||
import paper from "components/Paper"; | ||
/* eslint-disable jsx-extras/jsx-no-string-literals */ | ||
export default context => { | ||
const Button = button(context); | ||
const Paper = paper(context); | ||
const ButtonExamplesView = glamorous(Paper)({ | ||
maxWidth: 500, | ||
}); | ||
|
||
const ButtonGroupView = glamorous("div")({ | ||
"> button": { | ||
margin: 6 | ||
} | ||
}); | ||
|
||
return function buttonExamples() { | ||
return ( | ||
<div> | ||
<ButtonExamplesView> | ||
<h3>Flat</h3> | ||
<p> | ||
<ButtonGroupView> | ||
<Button label="FLAT LABEL" /> | ||
<Button primary>FLAT PRIMARY</Button> | ||
<Button accent>FLAT ACCENT</Button> | ||
<Button ripple label="RIPPLE FLAT" /> | ||
<Button disabled label="disabled FLAT LABEL" /> | ||
</p> | ||
</ButtonGroupView> | ||
<h3>Raised</h3> | ||
<p> | ||
<ButtonGroupView> | ||
<Button raised label="RAISED FLAT" /> | ||
<Button raised primary>RAISED PRIMARY</Button> | ||
<Button raised accent>RAISED ACCENT</Button> | ||
<Button raised ripple label="RAISED RIPPLE" /> | ||
<Button raised accent disabled>disabled RAISED ACCENT </Button> | ||
</p> | ||
</ButtonGroupView> | ||
<h3>Primary</h3> | ||
<p> | ||
<ButtonGroupView> | ||
<Button primary>PRIMARY</Button> | ||
<Button primary raised>PRIMARY RAISED</Button> | ||
<Button primary ripple raised>primary RIPPLE RAISED</Button> | ||
<Button primary disabled> | ||
primary disabled | ||
</Button> | ||
</p> | ||
</div> | ||
</ButtonGroupView> | ||
</ButtonExamplesView> | ||
); | ||
}; | ||
}; |
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,19 +1,38 @@ | ||
import React from "react"; | ||
import input from "./input"; | ||
import glamorous from "glamorous"; | ||
import paper from "components/Paper"; | ||
|
||
export default context => { | ||
const { tr } = context; | ||
const Paper = paper(context); | ||
const InputEmpty = input(context); | ||
const InputWithValue = input(context); | ||
const InputDisabled = input(context); | ||
const InputExamplesView = glamorous(Paper)({ | ||
}); | ||
const ListView = glamorous("div")({ | ||
"> div": { | ||
marginBottom: 30 | ||
} | ||
}); | ||
return function InputExamples() { | ||
return ( | ||
<div> | ||
<InputExamplesView> | ||
<h3>{tr.t("Input")}</h3> | ||
<InputEmpty label={tr.t("Input Text Empty")} /> | ||
<InputWithValue defaultValue="something" label={tr.t("Input with value")} /> | ||
<InputDisabled disabled defaultValue="disabled" label={tr.t("Input disabled")} /> | ||
</div> | ||
<ListView> | ||
<InputEmpty label={tr.t("Input Text Empty")} /> | ||
<InputWithValue | ||
defaultValue="something" | ||
label={tr.t("Input with value")} | ||
/> | ||
<InputDisabled | ||
disabled | ||
defaultValue="disabled" | ||
label={tr.t("Input disabled")} | ||
/> | ||
</ListView> | ||
</InputExamplesView> | ||
); | ||
}; | ||
}; |
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,20 +1,22 @@ | ||
import React from "react"; | ||
import paper from "components/Paper"; | ||
import spinner from "./spinner"; | ||
|
||
export default context => { | ||
const { tr, theme } = context; | ||
const { palette } = theme; | ||
const Paper = paper(context); | ||
const Spinner = spinner(context); | ||
return function SpinnerExamples() { | ||
return ( | ||
<div> | ||
<Paper> | ||
<h3>{tr.t("Spinner")}</h3> | ||
|
||
<Spinner /> | ||
<Spinner size={30} /> | ||
<Spinner size={40} color={palette.primary} /> | ||
<Spinner size={50} color={palette.secondary} /> | ||
</div> | ||
</Paper> | ||
); | ||
}; | ||
}; |
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