diff --git a/.changeset/kind-books-heal.md b/.changeset/kind-books-heal.md new file mode 100644 index 0000000000..2ad2491890 --- /dev/null +++ b/.changeset/kind-books-heal.md @@ -0,0 +1,16 @@ +--- +"@marigold/docs": major +"@marigold/components": major +--- + +refa: improve `` and `` component + +**BREAKING CHANGE:** This PR includes breaking changes, because we removed and changed a lot ot the props API of `` and ``. The `` now only works with `` and `` component. This allows for a smoother developer experience and prevents suprises. + +Make the `` and `` component more usable for real world scenarios. + +- `` supporst `space` style prop +- simplify `` usage by removing unnecessary props +- simplify ´` and make it composable with other layout components +- make `` and `` adhere to a `` content length + diff --git a/docs/content/components/form/slider/slider-form.demo.tsx b/docs/content/components/form/slider/slider-form.demo.tsx index f6e32fc70e..c4343af5a0 100644 --- a/docs/content/components/form/slider/slider-form.demo.tsx +++ b/docs/content/components/form/slider/slider-form.demo.tsx @@ -1,10 +1,9 @@ import { FormEvent } from 'react'; import { Button, - Container, + Center, FieldBase, FieldGroup, - Inline, Slider, Stack, } from '@marigold/components'; @@ -20,26 +19,26 @@ export default () => { }; return ( - +
- - - - - - - - + + + + + + + + - +
- +
); }; diff --git a/docs/content/components/form/switch/switch-appearance.demo.tsx b/docs/content/components/form/switch/switch-appearance.demo.tsx index 5af60bb731..809470a335 100644 --- a/docs/content/components/form/switch/switch-appearance.demo.tsx +++ b/docs/content/components/form/switch/switch-appearance.demo.tsx @@ -1,7 +1,5 @@ -import { Container, Switch, SwitchProps } from '@marigold/components'; +import { Switch, SwitchProps } from '@marigold/components'; export default (props: SwitchProps) => ( - - Default Switch - + Default Switch ); diff --git a/docs/content/components/form/switch/switch-basic.demo.tsx b/docs/content/components/form/switch/switch-basic.demo.tsx deleted file mode 100644 index 15fc1d4b60..0000000000 --- a/docs/content/components/form/switch/switch-basic.demo.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Container, Switch } from '@marigold/components'; - -export default () => ( - - Default Switch - -); diff --git a/docs/content/components/layout/breakout/breakout-appearance.demo.tsx b/docs/content/components/layout/breakout/breakout-appearance.demo.tsx new file mode 100644 index 0000000000..7abf096fb5 --- /dev/null +++ b/docs/content/components/layout/breakout/breakout-appearance.demo.tsx @@ -0,0 +1,32 @@ +import { + Aspect, + Breakout, + Container, + Headline, + Image, + Text, +} from '@marigold/components'; + +export default () => ( + + + Welcome to The Giggle Grounds - Laughville's New Comedy Hub! + + + + + + + + Laughville, get ready to laugh! Introducing The Giggle Grounds, an outdoor + amphitheater for comedy under the stars. Located at 123 Main Street, this + venue blends natural charm with live entertainment for a perfect night + out. With a capacity of 500, The Giggle Grounds offers an intimate yet + lively experience, ideal for enjoying top comedians in an open-air + setting. Pricing ranges from $1000 to $5000, making it flexible for + various events and budgets. Join us at The Giggle Grounds for an + unforgettable comedy experience! For bookings or more information, visit + us at 123 Main Street, Laughville. + + +); diff --git a/docs/content/components/layout/breakout/breakout-complex.demo.tsx b/docs/content/components/layout/breakout/breakout-complex.demo.tsx new file mode 100644 index 0000000000..3980c119d6 --- /dev/null +++ b/docs/content/components/layout/breakout/breakout-complex.demo.tsx @@ -0,0 +1,44 @@ +import { + Aspect, + Breakout, + Container, + Headline, + Image, + Inline, + Text, +} from '@marigold/components'; + +export default () => ( + + Upcoming Shows at The Guffaw Gardens + + + + + + + + + + + + + + + Get ready for a season of laughter at The Guffaw Gardens! This spring, + don't miss the Laugh Bloom Festival, featuring some of the best names in + comedy. + + + On May 5th, The Petal Punchlines will be hosted by comedian Rosie Petals, + known for her sharp wit. On May 12th, Chuckles & Chill will bring a + relaxed evening of comedy with Ivy Green and Marv "The Bloom" Thompson. + Finish the month with Botanical Banter on May 26th, headlined by Daisy + Bloom and Fern Tickles, promising a night full of laughs. + + + Whether with friends or for a special night out, The Guffaw Gardens is the + place to be for comedy and nature this season. + + +); diff --git a/docs/content/components/layout/breakout/breakout.mdx b/docs/content/components/layout/breakout/breakout.mdx index 63d7ab55af..1c0c80a3ab 100644 --- a/docs/content/components/layout/breakout/breakout.mdx +++ b/docs/content/components/layout/breakout/breakout.mdx @@ -1,40 +1,57 @@ --- title: Breakout -caption: Component that breaks out of a grid layout context. +caption: When you need to break out of a grid layout. +badge: updated --- -`` is a layout component which lets you span the full row in a CSS grid context e.g. our [``](container/) component. +The `` component is designed to help elements break out of their current container layout, creating visual interest and giving content the space it needs to stand out. Combine `` with the `` component to maintain a cohesive design while effectively drawing attention to important elements. -You need this component if you want to display something out of the context. It is also possible to put several components into the ``. +## Usage -You can use `alignX` or `alignY` to place the items inside the `` element. +Use the `` component when you need elements to break out of their current container layout, adding visual interest and giving content the space it needs to stand out. -## Import +It is particularly useful for situations where extra emphasis is needed or when you want to create a more dynamic and engaging reading experience. `` is ideal for highlighting media elements or other key content. -```tsx -import { Breakout } from '@marigold/components'; -``` + -## Props - - - -## Examples +### Complex layouts -### Vertical alignment +You can create more complex layouts within the `` component by combining it with other layout components. By nesting ``, ``, or `` inside ``, you can design advanced, responsive structures that go beyond simple content. -In this case the `height` prop is necessary, if you haven't set it, the `alignY` has no impact. +Note that the `` component will still adhere to the content length defined by the ``. - + -### Horizontal alignment - -Example to show how the `alignX` prop is to set. Options are `"left" | "center" | "right"`. The default value is `left`. - - +## Props -### Breakout iframe + -This example shows how to use an `