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

Fix: Implement Custom Style Hook for Card component #33912

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
simplified styles only changed background to red
  • Loading branch information
terynkum committed Mar 4, 2025
commit 4a67bb5129e80f4bbf82a0021de5487dcbe0a509
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import {
Caption1,
Button,
mergeClasses,
tokens,
FluentProvider,
Card,
CardFooter,
@@ -18,10 +17,7 @@ import type { CardState, FluentProviderCustomStyleHooks } from '@fluentui/react-

const useCardStyle = makeStyles({
root: {
backgroundColor: tokens.colorNeutralBackground3,
width: '620px',
maxWidth: '100%',
margin: 'auto',
backgroundColor: 'red',
},
});

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import * as React from 'react';
import { makeStyles, Button, tokens, FluentProvider, mergeClasses } from '@fluentui/react-components';
import { makeStyles, Button, FluentProvider, mergeClasses } from '@fluentui/react-components';
import { ArrowReply16Regular, MoreHorizontal20Regular, Share16Regular } from '@fluentui/react-icons';
import { CardFooter } from '@fluentui/react-components';
import type { CardState, FluentProviderCustomStyleHooks } from '@fluentui/react-components';

const useCardFooterStyle = makeStyles({
root: {
backgroundColor: tokens.colorNeutralBackground3,
width: '300px',
margin: 'auto',
backgroundColor: 'red',
},
});

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import * as React from 'react';
import { CardHeader } from '@fluentui/react-components';
import { makeStyles, Button, Body1, Caption1, tokens, FluentProvider, mergeClasses } from '@fluentui/react-components';
import { makeStyles, Button, Body1, Caption1, FluentProvider, mergeClasses } from '@fluentui/react-components';
import { MoreHorizontal20Regular } from '@fluentui/react-icons';
import type { CardState, FluentProviderCustomStyleHooks } from '@fluentui/react-components';

const useCardHeaderStyle = makeStyles({
root: {
backgroundColor: tokens.colorNeutralBackground3,
width: '300px',
margin: 'auto',
backgroundColor: 'red',
},
});

Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import * as React from 'react';
import { CardPreview, tokens, makeStyles, mergeClasses, FluentProvider } from '@fluentui/react-components';
import { CardPreview, makeStyles, mergeClasses, FluentProvider } from '@fluentui/react-components';
import type { CardState, FluentProviderCustomStyleHooks } from '@fluentui/react-components';

const useCardPreviewStyle = makeStyles({
root: {
backgroundColor: tokens.colorNeutralBackground3,
backgroundColor: 'red',
padding: '30px',
margin: 'auto',
},
});

Loading
Oops, something went wrong.