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

feat: update themes, textStyle font family to be generic #310

Merged
merged 5 commits into from
Apr 6, 2023

Conversation

karrui
Copy link
Collaborator

@karrui karrui commented Apr 6, 2023

This PR adds new design themes for PaySG, DistributeSG, etc to the storybook for preview.
Also updates textStyle font family to be generic so they can be replaced in Chakra's global theme declaration as needed.

For example, to change to another font (or use NextJS font loading):

// _app.ts
import { interFont } from '~/theme'

const MyApp = (({ Component, pageProps }) => {
  return (
    <main className={interFont.className}>
      <ThemeProvider theme={theme}>
        {getLayout(<Component {...pageProps} />)}
      </ThemeProvider>
    </main>
  )
})

// theme.ts, NextJS next/font example
import { extendTheme } from '@chakra-ui/react'


const interFont = Inter({ subsets: ['latin'] })

export const theme = extendTheme({
  ...
  fonts: {
    body: interFont.style.fontFamily,
  },

@netlify
Copy link

netlify bot commented Apr 6, 2023

Deploy Preview for objective-bell-0ffbfb canceled.

Name Link
🔨 Latest commit 502ccc6
🔍 Latest deploy log https://app.netlify.com/sites/objective-bell-0ffbfb/deploys/642e6e75abe9040008cb5fdc

@karrui karrui changed the title feat/update themes feat: update themes, textStyle font family to be generic Apr 6, 2023
@karrui karrui merged commit 28391a7 into main Apr 6, 2023
@karrui karrui deleted the feat/update-themes branch April 6, 2023 07:09
@karrui karrui mentioned this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant