Skip to content

Commit

Permalink
Drop Media layout in favour of Toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna committed Jul 4, 2022
1 parent e748eea commit 88e9644
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 324 deletions.
3 changes: 1 addition & 2 deletions src/docs/contribute/composition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ There are several types of composition approaches.
outside their parent components.

- **Mandatory subcomponents:** subcomponent must be used at least once in
order for the composition to work. E.g. `Media` + `MediaObject` +
`MediaBody`, `Tabs` + `TabsItem`, etc.
order for the composition to work. E.g. `Tabs` + `TabsItem`.

- **Optional subcomponents:** optional subcomponents may be used to achieve
special results. E.g. `FormLayout` + `FormLayoutCustomField` or `Grid` +
Expand Down
44 changes: 0 additions & 44 deletions src/lib/components/Media/Media.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions src/lib/components/Media/Media.scss

This file was deleted.

40 changes: 0 additions & 40 deletions src/lib/components/Media/MediaBody.jsx

This file was deleted.

40 changes: 0 additions & 40 deletions src/lib/components/Media/MediaObject.jsx

This file was deleted.

63 changes: 0 additions & 63 deletions src/lib/components/Media/README.mdx

This file was deleted.

46 changes: 0 additions & 46 deletions src/lib/components/Media/__tests__/Media.test.jsx

This file was deleted.

32 changes: 0 additions & 32 deletions src/lib/components/Media/__tests__/MediaBody.test.jsx

This file was deleted.

32 changes: 0 additions & 32 deletions src/lib/components/Media/__tests__/MediaObject.test.jsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/lib/components/Media/index.js

This file was deleted.

15 changes: 14 additions & 1 deletion src/lib/components/Toolbar/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ specifically for this kind of job.
## Flexible Items

Toolbar items can be made flexible to grow and shrink according to the available
space. This is useful e.g. when you need to combine text with an action.
space. This is useful e.g. when you need to combine text with an action:

<Playground>
<Toolbar>
Expand All @@ -320,6 +320,19 @@ space. This is useful e.g. when you need to combine text with an action.
</Toolbar>
</Playground>

Or to build a classic media layout with image on the left and text on the right:

<Playground>
<Toolbar>
<ToolbarItem>
<Placeholder bordered>Media object</Placeholder>
</ToolbarItem>
<ToolbarItem flexible>
<Placeholder bordered>Media body</Placeholder>
</ToolbarItem>
</Toolbar>
</Playground>

## API

<Props table of={Toolbar} />
Expand Down
5 changes: 0 additions & 5 deletions src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export {
Grid,
GridSpan,
} from './components/Grid';
export {
Media,
MediaBody,
MediaObject,
} from './components/Media';
export { default as Modal } from './components/Modal';
export { default as Paper } from './components/Paper';
export {
Expand Down

0 comments on commit 88e9644

Please sign in to comment.