Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCSE-190] Setup Chakra UI theming folders and files #51

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/ui/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {theme} from "../theme.ts"
import { theme } from "../theme"
import * as NextImage from "next/image";

export const parameters = {
Expand All @@ -20,4 +20,4 @@ const OriginalNextImage = NextImage.default;
Object.defineProperty(NextImage, "default", {
configurable: true,
value: (props) => <OriginalNextImage {...props} unoptimized />,
});
});
14 changes: 0 additions & 14 deletions packages/ui/theme.ts

This file was deleted.

17 changes: 17 additions & 0 deletions packages/ui/theme/components/Button.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineStyleConfig } from '@chakra-ui/react';

const Button = defineStyleConfig({
// Styles for the base style
baseStyle: {},

// Styles for the size variations
sizes: {},

// Styles for the visual style variations
variants: {},

// The default `size` or `variant` values
defaultProps: {},
});

export default Button;
5 changes: 5 additions & 0 deletions packages/ui/theme/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Button from './Button';

const components = { Button };

export default components;
7 changes: 7 additions & 0 deletions packages/ui/theme/foundations/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const colors = {
// brand: {
//
// }
};

export default colors;
9 changes: 9 additions & 0 deletions packages/ui/theme/foundations/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const fonts = {
heading: `'Roboto', sans-serif`,
body: `'Roboto', sans-serif`,
title: `'Roboto', sans-serif`,
navigation: `'Poppins', sans-serif`,
timestamp: `'Roboto Slab', sans-serif`
};

export default fonts;
27 changes: 27 additions & 0 deletions packages/ui/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { extendTheme, ThemeConfig } from '@chakra-ui/react';

const config: ThemeConfig = {
// If dark mode is enabled
// initialColorMode: 'light',
// useSystemColorMode: false,
};

// Global style overrides
import styles from './styles';

// Foundational style overrides
import fonts from './foundations/fonts';
import colors from './foundations/colors';

// Component style overrides
import components from './components';

const overrides = {
config,
styles,
fonts,
colors,
components,
};

export const theme = extendTheme(overrides);
12 changes: 12 additions & 0 deletions packages/ui/theme/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// import { mode } from '@chakra-ui/theme-tools';

// global styles
const styles = {
// global: (props: StyleFunctionProps) => ({
// body: {
// bg: mode('#FFFFFF', '#121212')(props),
// },
// }),
};

export default styles;