generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add material UI and theme (#381)
```ts <Container maxWidth='sm' sx={{ m: 4 }}> <Stack spacing={2}> <Button variant='contained'>Sample MUI Button</Button> <Button variant='contained'>Sample MUI Button</Button> </Stack> </Container> ``` Produces this UI: <img width="1334" alt="Screenshot 2023-09-13 at 5 48 41 PM" src="https://github.com/TBD54566975/ftl/assets/51647/bd684ad0-a0ef-4348-89af-a4520386bae0"> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4b3b74e
commit dce536d
Showing
10 changed files
with
777 additions
and
124 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { ViewModuleRounded } from '@mui/icons-material' | ||
import { PageHeader } from '../../components/PageHeader' | ||
import { ModulesList } from './ModulesList' | ||
import { Button, Container, Stack } from '@mui/material' | ||
|
||
export const ModulesPage = () => { | ||
return ( | ||
<> | ||
<div className='w-full m-0'> | ||
<PageHeader icon={<ViewModuleRounded />} title='Modules' /> | ||
<ModulesList /> | ||
</div> | ||
<Container maxWidth='sm' sx={{ m: 4 }}> | ||
<Stack spacing={2}> | ||
<Button variant='contained'>Sample MUI Button</Button> | ||
<Button variant='contained'>Sample MUI Button</Button> | ||
</Stack> | ||
</Container> | ||
</> | ||
) | ||
} |
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,70 @@ | ||
import { alpha } from '@mui/material/styles' | ||
|
||
const withAlphas = (color) => { | ||
return { | ||
...color, | ||
alpha4: alpha(color.main, 0.04), | ||
alpha8: alpha(color.main, 0.08), | ||
alpha12: alpha(color.main, 0.12), | ||
alpha30: alpha(color.main, 0.3), | ||
alpha50: alpha(color.main, 0.5), | ||
} | ||
} | ||
|
||
export const neutral = { | ||
50: '#F8F9FA', | ||
100: '#F3F4F6', | ||
200: '#E5E7EB', | ||
300: '#D2D6DB', | ||
400: '#9DA4AE', | ||
500: '#6C737F', | ||
600: '#4D5761', | ||
700: '#2F3746', | ||
800: '#1C2536', | ||
900: '#111927', | ||
} | ||
|
||
export const indigo = withAlphas({ | ||
lightest: '#F5F7FF', | ||
light: '#EBEEFE', | ||
main: '#6366F1', | ||
dark: '#4338CA', | ||
darkest: '#312E81', | ||
contrastText: '#FFFFFF', | ||
}) | ||
|
||
export const success = withAlphas({ | ||
lightest: '#F0FDF9', | ||
light: '#3FC79A', | ||
main: '#10B981', | ||
dark: '#0B815A', | ||
darkest: '#134E48', | ||
contrastText: '#FFFFFF', | ||
}) | ||
|
||
export const info = withAlphas({ | ||
lightest: '#ECFDFF', | ||
light: '#CFF9FE', | ||
main: '#06AED4', | ||
dark: '#0E7090', | ||
darkest: '#164C63', | ||
contrastText: '#FFFFFF', | ||
}) | ||
|
||
export const warning = withAlphas({ | ||
lightest: '#FFFAEB', | ||
light: '#FEF0C7', | ||
main: '#F79009', | ||
dark: '#B54708', | ||
darkest: '#7A2E0E', | ||
contrastText: '#FFFFFF', | ||
}) | ||
|
||
export const error = withAlphas({ | ||
lightest: '#FEF3F2', | ||
light: '#FEE4E2', | ||
main: '#F04438', | ||
dark: '#B42318', | ||
darkest: '#7A271A', | ||
contrastText: '#FFFFFF', | ||
}) |
Oops, something went wrong.