Skip to content

Commit

Permalink
feat: add theme file
Browse files Browse the repository at this point in the history
  • Loading branch information
Aghon5304 committed Sep 25, 2024
1 parent fba67a4 commit db3d66f
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 5 deletions.
120 changes: 117 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"commitlint": "^19.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0"
"react-helmet": "^6.1.0",
"styled-components": "^6.1.13"
},
"devDependencies": {
"@types/react": "^18.3.3",
Expand Down
14 changes: 14 additions & 0 deletions src/assets/styles/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { DefaultTheme } from 'styled-components';

export const theme: DefaultTheme = {
colors: {
black_100: '#000000',
white_100: '#FFFFFF',
red_100: '#F13D42',
red_50: '#FB9999',
red_25: '#FFCCCC',
grey_75: '#434343',
grey_50: '#737373',
grey_25: '#BBBBBB',
},
};
6 changes: 5 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from 'react';

import ReactDOM from 'react-dom/client';
import { ThemeProvider } from 'styled-components';

import App from './App';
import { theme } from './assets/styles/theme';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</React.StrictMode>,
);
9 changes: 9 additions & 0 deletions src/types/style.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'styled-components';

declare module 'unievent-styled-components' {
export interface DefaultTheme {
colors: {
[key: string]: string;
};
}
}

0 comments on commit db3d66f

Please sign in to comment.