Skip to content

Commit

Permalink
Move <CardHeader /> to card-header/ subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jun 9, 2021
1 parent de342d6 commit 33348bf
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 13 deletions.
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,12 @@
"markdown_source": "../packages/components/src/card/card-footer/README.md",
"parent": "components"
},
{
"title": "CardHeader",
"slug": "card-header",
"markdown_source": "../packages/components/src/card/card-header/README.md",
"parent": "components"
},
{
"title": "Card",
"slug": "card",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import classnames from 'classnames';
/**
* Internal dependencies
*/
import { HeaderUI } from './styles';
import { useCardContext } from './context';
import { HeaderUI } from '../styles';
import { useCardContext } from '../context';

export const defaultProps = {
isBorderless: false,
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { default as Card } from './card';
export { default as CardBody } from './card-body';
export { default as CardDivider } from './card-divider';
export { default as CardFooter } from './card-footer';
export { default as CardHeader } from './card-header';
3 changes: 1 addition & 2 deletions packages/components/src/card/stories/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { text, boolean } from '@storybook/addon-knobs';
/**
* Internal dependencies
*/
import { Card, CardBody, CardFooter } from '../';
import CardHeader from '../header';
import { Card, CardBody, CardFooter, CardHeader } from '../';
import { getCardStoryProps } from './_utils';

export default { title: 'Components/Card', component: Card };
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/card/stories/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { boolean, text } from '@storybook/addon-knobs';
/**
* Internal dependencies
*/
import { Card } from '../';
import CardHeader from '../header';
import { Card, CardHeader } from '../';
import Button from '../../button';
import { FlexBlock, FlexItem } from '../../flex';
import { getCardStoryProps } from './_utils';
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/card/stories/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import styled from '@emotion/styled';
/**
* Internal dependencies
*/
import { Card, CardBody, CardFooter } from '../';
import CardHeader from '../header';
import { Card, CardBody, CardFooter, CardHeader } from '../';
import CardMedia from '../media';
import { getCardStoryProps } from './_utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/card/test/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { shallow } from 'enzyme';
/**
* Internal dependencies
*/
import CardHeader from '../header';
import { CardHeader } from '../';

describe( 'CardHeader', () => {
describe( 'basic rendering', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/card/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { mount, shallow } from 'enzyme';
/**
* Internal dependencies
*/
import { Card, CardBody, CardDivider, CardFooter } from '../';
import CardHeader from '../header';
import { Card, CardBody, CardDivider, CardFooter, CardHeader } from '../';
import CardMedia from '../media';

describe( 'Card', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export { default as BaseControl } from './base-control';
export { default as __experimentalBoxControl } from './box-control';
export { default as Button } from './button';
export { default as ButtonGroup } from './button-group';
export { Card, CardBody, CardDivider, CardFooter } from './card';
export { default as CardHeader } from './card/header';
export { Card, CardBody, CardDivider, CardFooter, CardHeader } from './card';
export { default as CardMedia } from './card/media';
export { default as CheckboxControl } from './checkbox-control';
export { default as ClipboardButton } from './clipboard-button';
Expand Down

0 comments on commit 33348bf

Please sign in to comment.