-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* set-up emotion and mui * switch to styled, add type for theme * fix styling * fix styles Co-authored-by: Anastasiia Moskvina <anastasiia_moskvina@epam.com>
- Loading branch information
1 parent
4f41441
commit f2d3f97
Showing
15 changed files
with
585 additions
and
838 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"presets": [ | ||
"@babel/env", | ||
["@babel/react", { "runtime": "automatic" }], | ||
["@babel/react", { "runtime": "automatic", "importSource": "@emotion/react" }], | ||
"@babel/typescript" | ||
], | ||
"plugins": ["@babel/plugin-transform-runtime"] | ||
"plugins": ["@emotion", "@babel/plugin-transform-runtime"] | ||
} |
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 was deleted.
Oops, something went wrong.
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,11 +1,21 @@ | ||
import { Provider } from 'react-redux' | ||
import { store } from 'state' | ||
import { Viewer } from './Viewer' | ||
import _ from 'lodash' | ||
import { Theme, ThemeProvider } from '@emotion/react' | ||
import { mainTheme } from 'src/theming' | ||
import { createTheme } from '@mui/material/styles' | ||
import { CssBaseline } from '@mui/material' | ||
|
||
const muiTheme = createTheme() | ||
|
||
export const ViewerContainer = (props) => { | ||
return ( | ||
<Provider store={store}> | ||
<Viewer {...props} /> | ||
<ThemeProvider theme={_.merge(muiTheme, mainTheme) as Theme}> | ||
<CssBaseline /> | ||
<Viewer {...props} /> | ||
</ThemeProvider> | ||
</Provider> | ||
) | ||
} |
30 changes: 25 additions & 5 deletions
30
packages/miew-react/src/__snapshots__/Viewer.test.tsx.snap
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './mainTheme' |
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,18 @@ | ||
export const mainTheme = { | ||
customTheme: { | ||
palette: { | ||
accent: { | ||
main: '#337ab7', | ||
dark: '#286090' | ||
}, | ||
primary: { | ||
main: '#333', | ||
light: '#eee', | ||
dark: '#383838' | ||
} | ||
}, | ||
typography: { | ||
htmlFontSize: 16 | ||
} | ||
} | ||
} |
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
Oops, something went wrong.