Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GSC Material UI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GSC Frameworks
GSC Material UI
Commits
6ecf9b3d
Commit
6ecf9b3d
authored
Sep 02, 2019
by
Ben Galloway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create new theme-only export
Split out theme definition for reuse
parent
70362fb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
81 deletions
+87
-81
src/index.js
src/index.js
+4
-81
src/theme.js
src/theme.js
+6
-0
src/themeDefinition.js
src/themeDefinition.js
+77
-0
No files found.
src/index.js
View file @
6ecf9b3d
import
React
from
"
react
"
;
import
{
MuiThemeProvider
,
createMuiTheme
,
responsiveFontSizes
}
from
"
@material-ui/core/styles
"
;
import
{
CssBaseline
}
from
"
@material-ui/core
"
;
import
theme
from
"
./themeDefinition
"
;
const
GSCTheme
=
responsiveFontSizes
(
createMuiTheme
({
gsc
:
{
// Core
navy
:
"
#2e2d44
"
,
teal
:
"
#30b7bb
"
,
offwhite
:
"
#f1f4f5
"
,
// Secondary
pink
:
"
#e12a58
"
,
gold
:
"
#e5b94c
"
,
// Tertiary
darkteal
:
"
#036173
"
,
blue
:
"
#36a9e1
"
,
lime
:
"
#d5db40
"
,
orange
:
"
#e56a0c
"
,
red
:
"
#e40426
"
,
purple
:
"
#64335f
"
,
green
:
"
#22b573
"
,
white
:
"
#ffffff
"
,
},
palette
:
{
primary
:
{
main
:
"
#2e2d44
"
,
contrastText
:
"
#f1f4f5
"
,
},
secondary
:
{
main
:
"
#30b7bb
"
,
contrastText
:
"
#2e2d44
"
,
},
error
:
{
main
:
"
#e40426
"
,
},
background
:
{
default
:
"
#f1f4f5
"
,
paper
:
"
#ffffff
"
,
},
},
typography
:
{
fontFamily
:
[
'
"Helvetica Neue"
'
,
"
Arial
"
,
"
sans-serif
"
,
"
-apple-system
"
,
"
BlinkMacSystemFont
"
,
'
"Segoe UI"
'
,
'
"Apple Color Emoji"
'
,
'
"Segoe UI Emoji"
'
,
'
"Segoe UI Symbol"
'
,
].
join
(
"
,
"
),
h1
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h2
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h3
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h4
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h5
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h6
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
button
:
{
textTransform
:
"
none
"
,
},
},
})
);
const
GSCTheme
=
responsiveFontSizes
(
createMuiTheme
(
theme
));
const
GSCMaterial
=
props
=>
(
const
GSCMaterial
=
({
children
})
=>
(
<
MuiThemeProvider
theme
=
{
GSCTheme
}
>
<
CssBaseline
/>
{
props
.
children
}
{
children
}
<
/MuiThemeProvider
>
);
...
...
src/theme.js
0 → 100644
View file @
6ecf9b3d
import
{
createMuiTheme
,
responsiveFontSizes
}
from
"
@material-ui/styles
"
;
import
theme
from
"
./themeDefinition
"
;
const
GSCTheme
=
responsiveFontSizes
(
createMuiTheme
(
theme
));
export
default
GSCTheme
;
src/themeDefinition.js
0 → 100644
View file @
6ecf9b3d
export
default
GSCTheme
=
{
gsc
:
{
// Core
navy
:
"
#2e2d44
"
,
teal
:
"
#30b7bb
"
,
offwhite
:
"
#f1f4f5
"
,
// Secondary
pink
:
"
#e12a58
"
,
gold
:
"
#e5b94c
"
,
// Tertiary
darkteal
:
"
#036173
"
,
blue
:
"
#36a9e1
"
,
lime
:
"
#d5db40
"
,
orange
:
"
#e56a0c
"
,
red
:
"
#e40426
"
,
purple
:
"
#64335f
"
,
green
:
"
#22b573
"
,
white
:
"
#ffffff
"
,
},
palette
:
{
primary
:
{
main
:
"
#2e2d44
"
,
contrastText
:
"
#f1f4f5
"
,
},
secondary
:
{
main
:
"
#30b7bb
"
,
contrastText
:
"
#2e2d44
"
,
},
error
:
{
main
:
"
#e40426
"
,
},
background
:
{
default
:
"
#f1f4f5
"
,
paper
:
"
#ffffff
"
,
},
},
typography
:
{
fontFamily
:
[
'
"Helvetica Neue"
'
,
"
Arial
"
,
"
sans-serif
"
,
"
-apple-system
"
,
"
BlinkMacSystemFont
"
,
'
"Segoe UI"
'
,
'
"Apple Color Emoji"
'
,
'
"Segoe UI Emoji"
'
,
'
"Segoe UI Symbol"
'
,
].
join
(
"
,
"
),
h1
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h2
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h3
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h4
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h5
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
h6
:
{
fontFamily
:
"
ProximaNova
"
,
fontWeight
:
600
,
},
button
:
{
textTransform
:
"
none
"
,
},
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment