From 36e30a699ae81bc886175ad8ece0d3d52b784f3e Mon Sep 17 00:00:00 2001 From: sarahgm <38324334+sarahgm@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:58:15 +0200 Subject: [PATCH] docs: breakout page (#3154) --- .../Breakout/horizontal-breakout.demo.tsx | 22 ++---- docs/content/components/breakout/breakout.mdx | 68 +++++++++++++++++++ .../breakout/horizontal-breakout.demo.tsx | 11 +++ .../breakout/iframe-breakout.demo.tsx | 29 ++++++++ .../breakout/vertical-breakout.demo.tsx | 13 ++++ docs/registry/index.tsx | 21 ++++++ 6 files changed, 146 insertions(+), 18 deletions(-) create mode 100644 docs/content/components/breakout/breakout.mdx create mode 100644 docs/content/components/breakout/horizontal-breakout.demo.tsx create mode 100644 docs/content/components/breakout/iframe-breakout.demo.tsx create mode 100644 docs/content/components/breakout/vertical-breakout.demo.tsx diff --git a/docs-old/src/demos/components/Breakout/horizontal-breakout.demo.tsx b/docs-old/src/demos/components/Breakout/horizontal-breakout.demo.tsx index ed05c827e9..32db1fa4d3 100644 --- a/docs-old/src/demos/components/Breakout/horizontal-breakout.demo.tsx +++ b/docs-old/src/demos/components/Breakout/horizontal-breakout.demo.tsx @@ -1,25 +1,11 @@ -import { Box, Breakout, Container } from '@marigold/components'; +import { Breakout, Container } from '@marigold/components'; export const HorizontalBreakout = () => ( - +
- BREAKOUT with right aligned content +
BREAKOUT with right aligned content
- +
); diff --git a/docs/content/components/breakout/breakout.mdx b/docs/content/components/breakout/breakout.mdx new file mode 100644 index 0000000000..5ea44963e6 --- /dev/null +++ b/docs/content/components/breakout/breakout.mdx @@ -0,0 +1,68 @@ +--- +title: Breakout +group: Layout +caption: Component that breaks out of a grid layout context. +--- + +`` is a layout component which lets you span the full row in a CSS grid context e.g. our [``](container/) component. + +You need this component if you want to display something out of the context. It is also possible to put several components into the ``. + +You can use `alignX` or `alignY` to place the items inside the `` element. + +## Usage + +### Import + +To import the component you just have to use this code below. + +```tsx +import { Breakout } from '@marigold/components'; +``` + +### Props + + + +## Examples + +### Vertical alignment + +In this case the `height` prop is necessary, if you haven't set it, the `alignY` has no impact. + + + +### Horizontal alignment + +Example to show how the `alignX` prop is to set. Options are `"left" | "center" | "right"`. The default value is `left`. + + + +### Breakout iframe + +This example shows how to use an `