-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Card component custom style hook unstable #33912
base: master
Are you sure you want to change the base?
Card component custom style hook unstable #33912
Conversation
Pull request demo site: URL |
packages/react-components/react-card/library/src/components/CustomHooks/index.ts
Outdated
Show resolved
Hide resolved
…ithub.com/terynk/fluentui into card-component-custom-style-hook-unstable
packages/react-components/react-card/library/src/components/CardFooter/CardFooter.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Owen Campbell <ocampbell95@gmail.com>
📊 Bundle size reportUnchanged fixtures
|
@@ -0,0 +1,7 @@ | |||
{ | |||
"type": "minor", | |||
"comment": "fix custom style hook for Card, CardFooter, CardHeader, CardPreview", |
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.
double check this format matches the previous change logs.
|
||
const useCardStyle = makeStyles({ | ||
root: { | ||
backgroundColor: tokens.colorNeutralBackground3, |
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.
simplify these styles - just set than background to 'red' to ensure the styles pump through.
Then make it clear in the PR description that we'll remove it.
Old Behavior
Users were unable to apply Custom Style Hooks to Card, CardHeader, CardFooter, and CardPreview.
New Behavior
Users can now apply Custom Style Hooks to Card, CardHeader, CardFooter, and CardPreview. The screen shots below show test cases for each component that demonstrate the ability to apply Custom Hooks. In each Custom Hook, the backgroundColor of the component was updated to tokens.colorNeutralBackground3. The test code will be removed but can be found in commits 03817b9 and 65d20ca. The test code applies Custom Style Hooks to the Default styling of each component.
Test Screenshots
Default styling can be found under each subpage on the Fluent V9 Website
Card

CardFooter

CardHeader

CardPreview
