Improve report & changeset
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
---
|
||||
'@backstage/ui': minor
|
||||
---
|
||||
|
||||
**Breaking change** The `Cell` component has been refactored to be a generic wrapper component that accepts `children` for custom cell content. The text-specific functionality (previously part of `Cell`) has been moved to a new `CellText` component.
|
||||
|
||||
### Migration Guide
|
||||
|
||||
If you were using `Cell` with text-specific props (`title`, `description`, `leadingIcon`, `href`), you need to update your code to use `CellText` instead:
|
||||
|
||||
**Before:**
|
||||
|
||||
```tsx
|
||||
<Cell
|
||||
title="My Title"
|
||||
description="My description"
|
||||
leadingIcon={<Icon />}
|
||||
href="/path"
|
||||
/>
|
||||
```
|
||||
|
||||
**After:**
|
||||
|
||||
```tsx
|
||||
<CellText
|
||||
title="My Title"
|
||||
description="My description"
|
||||
leadingIcon={<Icon />}
|
||||
href="/path"
|
||||
/>
|
||||
```
|
||||
|
||||
For custom cell content, use the new generic `Cell` component:
|
||||
|
||||
```tsx
|
||||
<Cell>{/* Your custom content */}</Cell>
|
||||
```
|
||||
@@ -406,7 +406,16 @@ export interface CellProfileProps extends CellProps_2 {
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CellProps extends CellProps_2 {
|
||||
export interface CellProps extends CellProps_2 {}
|
||||
|
||||
// @public (undocumented)
|
||||
export const CellText: {
|
||||
(props: CellTextProps): JSX_2.Element;
|
||||
displayName: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CellTextProps extends CellProps_2 {
|
||||
// (undocumented)
|
||||
color?: TextColors;
|
||||
// (undocumented)
|
||||
@@ -863,12 +872,16 @@ export const LinkDefinition: {
|
||||
|
||||
// @public (undocumented)
|
||||
export interface LinkProps extends LinkProps_2 {
|
||||
// (undocumented)
|
||||
children?: ReactNode;
|
||||
// (undocumented)
|
||||
color?:
|
||||
| TextColors
|
||||
| TextColorStatus
|
||||
| Partial<Record<Breakpoint, TextColors | TextColorStatus>>;
|
||||
// (undocumented)
|
||||
title?: string;
|
||||
// (undocumented)
|
||||
truncate?: boolean;
|
||||
// (undocumented)
|
||||
variant?: TextVariants | Partial<Record<Breakpoint, TextVariants>>;
|
||||
|
||||
Reference in New Issue
Block a user