Skip to content

Commit

Permalink
Merge pull request backstage#4152 from adamdmharvey/InfoCard-variant
Browse files Browse the repository at this point in the history
chore(core): Remove deprecated InfoCard variant "height100"
  • Loading branch information
adamdmharvey authored Jan 20, 2021
2 parents f80c491 + 6effc8f commit 7abe2c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .changeset/calm-turtles-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@backstage/core': minor
---

Removed `InfoCard` variant `height100`, originally deprecated in [#2826](https://github.com/backstage/backstage/pull/2826).

If your component still relies on this variant, simply replace it with `gridItem`.
21 changes: 0 additions & 21 deletions packages/core/src/layout/InfoCard/InfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,11 @@ const VARIANT_STYLES = {
height: 'calc(100% - 10px)', // for pages without content header
marginBottom: '10px',
},
/**
* @deprecated This variant is replaced by 'gridItem'.
*/
height100: {
display: 'flex',
flexDirection: 'column',
height: 'calc(100% - 10px)', // for pages without content header
marginBottom: '10px',
},
},
cardContent: {
fullHeight: {
flex: 1,
},
/**
* @deprecated This variant is replaced by 'gridItem'.
*/
height100: {
flex: 1,
},
gridItem: {
flex: 1,
},
Expand Down Expand Up @@ -167,12 +152,6 @@ export const InfoCard = ({
if (variant) {
const variants = variant.split(/[\s]+/g);
variants.forEach(name => {
if (name === 'height100') {
// eslint-disable-next-line no-console
console.warn(
"Variant 'height100' of InfoCard is deprecated. Use variant 'gridItem' instead.",
);
}
calculatedStyle = {
...calculatedStyle,
...VARIANT_STYLES.card[name as keyof typeof VARIANT_STYLES['card']],
Expand Down

0 comments on commit 7abe2c2

Please sign in to comment.