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:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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
17
src/App/styles.ts
Normal 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',
|
||||
});
|
||||
Reference in New Issue
Block a user