-
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
Fix: Implement Custom Style Hook for Card component #33912
Open
terynk
wants to merge
15
commits into
microsoft:master
Choose a base branch
from
terynk:card-component-custom-style-hook-unstable
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix: Implement Custom Style Hook for Card component #33912
terynk
wants to merge
15
commits into
microsoft:master
from
terynk:card-component-custom-style-hook-unstable
+235
−120
Conversation
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
Pull request demo site: URL |
mltejera
reviewed
Feb 26, 2025
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
|
mltejera
reviewed
Feb 28, 2025
change/@fluentui-react-card-7fc24491-6b02-436b-8f94-650824f19639.json
Outdated
Show resolved
Hide resolved
mltejera
reviewed
Feb 28, 2025
packages/react-components/react-card/stories/src/Card/CardDefault.stories.tsx
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 The test code making the background red will be REMOVED. THIS IS FOR TESTING PURPOSES ONLY.
Card

CardFooter

CardHeader

CardPreview

Note: Changed padding in addition to backgroundColor because preview image covered the entire background so users were unable to see the red.