-
Notifications
You must be signed in to change notification settings - Fork 13
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
Initialize Chakra Theme #100
Conversation
@Myrfion can you please rebase on |
Log in screen (button has a brand color scheme):Log out screen (button has a brand color scheme):@humphd here it is |
app/theme/index.ts
Outdated
import { extendTheme } from '@chakra-ui/react'; | ||
import colors from './colors'; | ||
|
||
const theme = extendTheme({ colors }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set the default colorTheme
prop for Buttons, etc. as well (i.e., so you don't have to remember to do it each time)? See chakra-ui/chakra-ui#2840
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this would be really helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do it in a follow-up, @Myrfion/@Ririio if one of you wants to file it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can implement the button default theme right now. We do the others later on
@Myrfion I was able to test it locally, and it works. Looks good to me. 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could look into setting a default color theme for different components, but looks good
bc4db98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great
<ChakraProvider theme={theme}> | ||
<Outlet /> | ||
</ChakraProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use ChakraBaseProvider to only focus the theme on components that we actually want to have a different color like, button, box, grids, etc. The website is not big so it's not a big deal, but it's just a suggestion
app/theme/index.ts
Outdated
import { extendTheme } from '@chakra-ui/react'; | ||
import colors from './colors'; | ||
|
||
const theme = extendTheme({ colors }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can implement the button default theme right now. We do the others later on
What I did?
I created the folder
theme
where we gonna have all theme-related files. For now, it hasindex.ts
which imports all other files and initializes the theme itself. Another file iscolors.ts
where I added the Seneca colours in spectra from 100 to 900 and that colour I calledbrand
(this is how chakra does it in the example in the doc so probably this is the way to go in terms of naming). I also created the button onindex.ts
just to show how the component that uses the theme looks likeHow to test?
Just run the app locally and check the front end, you should see the button with very familiar color