forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add possibility to override default Code theme (#202)
* Code theme is now available via props * One Dark Pro now works outside of styleguide too * add Theme docs * move Code font to theme
- Loading branch information
1 parent
8bba1e5
commit 1b0b216
Showing
6 changed files
with
217 additions
and
10 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
70 changes: 70 additions & 0 deletions
70
packages/styleguide/src/components/Code/oneDarkProTheme.js
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
const theme = { | ||
plain: { | ||
color: 'rgb(171, 178, 191)', | ||
backgroundColor: 'rgb(40, 44, 52)', | ||
}, | ||
styles: [ | ||
{ | ||
types: ['punctuation', 'number'], | ||
style: { | ||
color: 'rgb(209, 154, 102)', | ||
}, | ||
}, | ||
{ | ||
types: ['constant'], | ||
style: { | ||
color: 'rgb(255, 255, 255)', | ||
}, | ||
}, | ||
{ | ||
types: ['char'], | ||
style: { | ||
color: 'rgb(97, 175, 239)', | ||
}, | ||
}, | ||
{ | ||
types: ['keyword', 'selector'], | ||
style: { | ||
color: 'rgb(198, 120, 221)', | ||
}, | ||
}, | ||
{ | ||
types: ['class-name', 'attr-name', 'string', 'symbol'], | ||
style: { | ||
color: 'rgb(86, 182, 194)', | ||
}, | ||
}, | ||
{ | ||
types: ['function', 'builtin', 'namespace', 'changed'], | ||
style: { | ||
color: 'rgb(229, 192, 123)', | ||
}, | ||
}, | ||
{ | ||
types: ['variable', 'tag', 'deleted'], | ||
style: { | ||
color: 'rgb(224, 108, 117)', | ||
}, | ||
}, | ||
{ | ||
types: ['operator'], | ||
style: { | ||
color: 'rgb(171, 178, 191)', | ||
}, | ||
}, | ||
{ | ||
types: ['inserted'], | ||
style: { | ||
color: 'rgb(152, 195, 121)', | ||
}, | ||
}, | ||
{ | ||
types: ['comment'], | ||
style: { | ||
fontStyle: 'italic', | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default theme; |
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