1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-17 16:45:49 +07:00

refactor: update global styles using emotion

This commit is contained in:
Griffithtp
2019-07-05 23:58:18 +01:00
parent a49780f5f0
commit 99e1bb3ea3
7 changed files with 75 additions and 43 deletions

View File

@@ -10,8 +10,8 @@ import Header from '../components/Header';
import { Container, Content } from '../components/Layout';
import RouterApp from '../router';
import API from '../utils/api';
import '../styles/typeface-roboto.scss';
import '../styles/main.scss';
import '../styles/typeface-roboto.css';
import '../utils/styles/global';
import 'normalize.css';
import Footer from '../components/Footer';
import { FormError } from 'src/components/Login/Login';
@@ -67,13 +67,7 @@ export default class App extends Component<{}, AppStateInterface> {
return (
// @ts-ignore
<Container isLoading={isLoading}>
{isLoading ? (
<Loading />
) : (
<>
<AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>
</>
)}
{isLoading ? <Loading /> : <AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>}
{this.renderLoginModal()}
</Container>
);

View File

@@ -1,16 +0,0 @@
@import './styles/variables';
.alertError {
background-color: $red !important;
min-width: inherit !important;
}
.alertErrorMsg {
display: flex;
align-items: center;
}
.alertIcon {
opacity: 0.9;
margin-right: 8px;
}

17
src/App/styles.ts Normal file
View File

@@ -0,0 +1,17 @@
import { css } from 'emotion';
import colors from '../utils/styles/colors';
export const alertError = css`
background-color: ${colors.red} !important;
min-width: inherit !important;
`;
export const alertErrorMsg = css`
display: flex;
align-items: center;
`;
export const alertIcon = css({
opacity: 0.9,
marginRight: '8px',
});