Merge pull request #10168 from backstage/rugvip/favorite

catalog-react: remove deprecated favorite column helpers
This commit is contained in:
Patrik Oldsberg
2022-03-14 14:48:38 +01:00
committed by GitHub
4 changed files with 6 additions and 27 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': minor
---
**BREAKING**: Removed the deprecated `favoriteEntityTooltip` and `favoriteEntityIcon` functions.
-8
View File
@@ -388,19 +388,11 @@ export interface EntityTypePickerProps {
// @public
export const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
// @public @deprecated (undocumented)
export const favoriteEntityIcon: (isStarred: boolean) => JSX.Element;
// @public (undocumented)
export type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
entity: Entity;
};
// @public @deprecated (undocumented)
export const favoriteEntityTooltip: (
isStarred: boolean,
) => 'Remove from favorites' | 'Add to favorites';
// @public
export function getEntityRelations(
entity: Entity | undefined,
@@ -32,20 +32,6 @@ const YellowStar = withStyles({
},
})(Star);
/**
* @public
* @deprecated due to low utility value.
*/
export const favoriteEntityTooltip = (isStarred: boolean) =>
isStarred ? 'Remove from favorites' : 'Add to favorites';
/**
* @public
* @deprecated due to low utility value.
*/
export const favoriteEntityIcon = (isStarred: boolean) =>
isStarred ? <YellowStar /> : <StarBorder />;
/**
* IconButton for showing if a current entity is starred and adding/removing it from the favorite entities
* @param props - MaterialUI IconButton props extended by required `entity` prop
@@ -14,9 +14,5 @@
* limitations under the License.
*/
export {
favoriteEntityTooltip,
favoriteEntityIcon,
FavoriteEntity,
} from './FavoriteEntity';
export { FavoriteEntity } from './FavoriteEntity';
export type { FavoriteEntityProps } from './FavoriteEntity';