Merge pull request #30717 from backstage/rugvip/buildfix
core-components: add FavoriteToggleProps
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Added `FavoriteToggleProps`.
|
||||
@@ -399,14 +399,7 @@ export type ErrorPanelProps = {
|
||||
};
|
||||
|
||||
// @public
|
||||
export function FavoriteToggle(
|
||||
props: ComponentProps<typeof IconButton> & {
|
||||
id: string;
|
||||
title: string;
|
||||
isFavorite: boolean;
|
||||
onToggle: (value: boolean) => void;
|
||||
},
|
||||
): JSX_2.Element;
|
||||
export function FavoriteToggle(props: FavoriteToggleProps): JSX_2.Element;
|
||||
|
||||
// @public
|
||||
export function FavoriteToggleIcon(props: {
|
||||
@@ -416,6 +409,14 @@ export function FavoriteToggleIcon(props: {
|
||||
// @public (undocumented)
|
||||
export type FavoriteToggleIconClassKey = 'icon' | 'iconBorder';
|
||||
|
||||
// @public
|
||||
export type FavoriteToggleProps = ComponentProps<typeof IconButton> & {
|
||||
id: string;
|
||||
title: string;
|
||||
isFavorite: boolean;
|
||||
onToggle: (value: boolean) => void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type FeatureCalloutCircleClassKey =
|
||||
| '@keyframes pulsateSlightly'
|
||||
|
||||
@@ -62,6 +62,18 @@ export function FavoriteToggleIcon(props: { isFavorite: boolean }) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Props for the {@link FavoriteToggle} component.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type FavoriteToggleProps = ComponentProps<typeof IconButton> & {
|
||||
id: string;
|
||||
title: string;
|
||||
isFavorite: boolean;
|
||||
onToggle: (value: boolean) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle encapsulating logic for marking something as favorite,
|
||||
* primarily used in various instances of entity lists and cards but can be used elsewhere.
|
||||
@@ -70,14 +82,7 @@ export function FavoriteToggleIcon(props: { isFavorite: boolean }) {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function FavoriteToggle(
|
||||
props: ComponentProps<typeof IconButton> & {
|
||||
id: string;
|
||||
title: string;
|
||||
isFavorite: boolean;
|
||||
onToggle: (value: boolean) => void;
|
||||
},
|
||||
) {
|
||||
export function FavoriteToggle(props: FavoriteToggleProps) {
|
||||
const {
|
||||
id,
|
||||
title,
|
||||
|
||||
@@ -15,4 +15,7 @@
|
||||
*/
|
||||
|
||||
export { FavoriteToggle, FavoriteToggleIcon } from './FavoriteToggle';
|
||||
export type { FavoriteToggleIconClassKey } from './FavoriteToggle';
|
||||
export type {
|
||||
FavoriteToggleIconClassKey,
|
||||
FavoriteToggleProps,
|
||||
} from './FavoriteToggle';
|
||||
|
||||
@@ -48,4 +48,3 @@ export * from './TabbedLayout';
|
||||
export * from './Table';
|
||||
export * from './TrendLine';
|
||||
export * from './WarningPanel';
|
||||
export * from './FavoriteToggle';
|
||||
|
||||
Reference in New Issue
Block a user