Align
Align ordnet bekannte Kombinationen von Components korrekt zueinander an.Max MustermannOrganisationsinhaber
import { Combine, Avatar, Initials, Text, } from "@mittwald/flow-react-components"; <Combine> <Avatar> <Initials>Max Mustermann</Initials> </Avatar> <Text> <strong>Max Mustermann</strong> Organisationsinhaber </Text> </Combine>
Best Practices
- Ersetze
<Align />durch Combine. Funktional ändert sich nichts, der neue Name beschreibt die Component treffender. - Nutze für die Migration den Codemod aus der MIGRATION.md.
- Align gibt zur Laufzeit eine Deprecation-Warnung aus und wird in einer zukünftigen Major-Version entfernt. Bis dahin bleibt der alte Pfad abgesichert (siehe Versionierung & Stabilität).
Properties
| Property | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | |
className | string | - | The elements class name. |
wrapWith | ReactElement<unknown, string | JSXElementConstructor<any>> | - | A React element the component is wrapped with. The element is cloned and receives the component as its only child — useful to render the component inside a link, a tooltip trigger or any other wrapper without changing the surrounding markup. |
ref | Ref<HTMLSpanElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see React Docs |
key | Key | - |