Skip to content

Commit

Permalink
refactor(CardColumns)!: remove component (#6030)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed CardColumns because it was dropped in Bootstrap 5
  • Loading branch information
kyletsang committed Sep 13, 2021
1 parent ca97dc8 commit d36718f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 141 deletions.
3 changes: 0 additions & 3 deletions src/CardColumns.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export type { ButtonToolbarProps } from './ButtonToolbar';
export { default as Card } from './Card';
export type { CardProps } from './Card';

export { default as CardColumns } from './CardColumns';

export { default as CardImg } from './CardImg';
export type { CardImgProps } from './CardImg';

Expand Down
67 changes: 32 additions & 35 deletions tests/simple-types-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
ButtonGroup,
ButtonToolbar,
Card,
CardColumns,
CardGroup,
Carousel,
Container,
Expand Down Expand Up @@ -184,40 +183,38 @@ const MegaComponent = () => (
<Button href="wooot" />
</ButtonGroup>
</ButtonToolbar>
<CardColumns style={style} bsPrefix="card-col">
<Card
as="div"
bg="primary"
body
border="primary"
text="primary"
bsPrefix="card"
style={{ width: '18rem' }}
>
<Card.Img
as="img"
variant="top"
src="holder.js/100px180"
bsPrefix="cardimg"
style={style}
/>
<Card.ImgOverlay
as="img"
src="holder.js/100px180"
bsPrefix="cardimg"
style={style}
/>
<Card.Body as="div" bsPrefix="cardbody" style={style}>
<Card.Title style={style}>Card Title</Card.Title>
<Card.Text style={style}>
Some quick example text to build on the card title and make up the
bulk of the card content.
</Card.Text>
<Button variant="primary">Go somewhere</Button>
</Card.Body>
</Card>
<CardGroup as="div" bsPrefix="cardgroup" style={style} />
</CardColumns>
<Card
as="div"
bg="primary"
body
border="primary"
text="primary"
bsPrefix="card"
style={{ width: '18rem' }}
>
<Card.Img
as="img"
variant="top"
src="holder.js/100px180"
bsPrefix="cardimg"
style={style}
/>
<Card.ImgOverlay
as="img"
src="holder.js/100px180"
bsPrefix="cardimg"
style={style}
/>
<Card.Body as="div" bsPrefix="cardbody" style={style}>
<Card.Title style={style}>Card Title</Card.Title>
<Card.Text style={style}>
Some quick example text to build on the card title and make up the
bulk of the card content.
</Card.Text>
<Button variant="primary">Go somewhere</Button>
</Card.Body>
</Card>
<CardGroup as="div" bsPrefix="cardgroup" style={style} />
<Carousel
activeIndex={1}
as="div"
Expand Down
92 changes: 0 additions & 92 deletions www/src/examples/Card/Columns.js

This file was deleted.

9 changes: 0 additions & 9 deletions www/src/pages/components/cards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import CardBgColor from '../../examples/Card/BgColor';
import CardBodyOnly from '../../examples/Card/BodyOnly';
import CardBodyShorthand from '../../examples/Card/BodyShorthand';
import CardBorder from '../../examples/Card/Border';
import CardColumns from '../../examples/Card/Columns';
import CardGrid from '../../examples/Card/Grid';
import CardGroup from '../../examples/Card/Group';
import CardHeaderAndFooter from '../../examples/Card/HeaderAndFooter';
Expand Down Expand Up @@ -136,10 +135,6 @@ Use `Row`'s [grid column](/layout/grid/#row-layout-col-sizing) props to control

<ReactPlayground codeText={CardGrid} />

### Card Columns

<ReactPlayground codeText={CardColumns} />

## API

<ComponentApi metadata={props.data.Card} />
Expand All @@ -154,7 +149,6 @@ Use `Row`'s [grid column](/layout/grid/#row-layout-col-sizing) props to control
<ComponentApi metadata={props.data.CardTitle} exportedBy={props.data.Card} />

<ComponentApi metadata={props.data.CardGroup} />
<ComponentApi metadata={props.data.CardColumns} />


export const query = graphql`
Expand Down Expand Up @@ -192,8 +186,5 @@ export const query = graphql`
CardGroup: componentMetadata(displayName: { eq: "CardGroup" }) {
...ComponentApi_metadata
}
CardColumns: componentMetadata(displayName: { eq: "CardColumns" }) {
...ComponentApi_metadata
}
}
`;
4 changes: 4 additions & 0 deletions www/src/pages/migrating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Below is a _rough_ account of the breaking API changes as well as the minimal ch

- removed `toggle`.

### CardColumns

- dropped `CardColumns`.

### CloseButton

- Removed `label` prop in favor of `aria-label`.
Expand Down

0 comments on commit d36718f

Please sign in to comment.