Back to Fluentui

Card Header Migration

apps/public-docsite-v9/src/Concepts/Migration/FromV0/Components/Card/CardHeader.mdx

4.40.2-hotfix21.8 KB
Original Source

import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Concepts/Migration/from v0/Components/Card Migration/CardHeader" />

Card Header Migration

Overview

Before:

tsx
import { CardHeader } from '@fluentui/react-northstar';

const Component = () => <CardHeader>Lorem ipsum</CardHeader>;

After:

tsx
import { CardHeader } from '@fluentui/react-components';

const Component = () => <CardHeader header="Lorem ipsum" />;

How to migrate props:

CardHeader propsmigration guide
as, classNamekeep it as is
variables, stylessee Migrate style overrides in this document
accessibilitysee migrate-custom-accessibility.md. Also check the focusMode new prop
fittedREMOVED: by default, all headers are fitted

Migrate style overrides

⚠️ If this is your first migration, please read the general guide on how to migrate styles.

Example for migrate boolean variables:

Follow the same patterns as in the Card migration guide.