-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DST-462]Refactor <Dialog> component use Grid Areas (#4164)
* Refactor dialog component * Fixing tests * Adding changeset * Adding more tests for content footer and actions sub-components * Deleting stack wrapper from withdialogcontroller story * Update changeset * Update docs examples * Remove the gap * Adding badge * Editing changeset * Adding more info in the changeset about changing dialog.headline to dialog.title
- Loading branch information
1 parent
4818227
commit 2d9917f
Showing
9 changed files
with
226 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@marigold/components': major | ||
'@marigold/theme-core': major | ||
'@marigold/theme-b2b': major | ||
--- | ||
|
||
**Breaking changes** | ||
|
||
- `Dialog.Headline` has been renamed to `Dialog.Title`. Please update your code accordingly. | ||
|
||
- `<Dialog.Content>`, `<Dialog.Actions>`, and `<Dialog.Footer>` have been introduced for better organization and flexibility. | ||
|
||
- The internal layout now uses grid areas, ensuring consistent ordering and layout of the dialog elements. | ||
|
||
- Existing implementations of the `<Dialog>` component will need to be updated to use these new subcomponents. | ||
|
8 changes: 5 additions & 3 deletions
8
docs/content/components/overlay/dialog/dialog-dismiss.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { Button, Dialog, Headline, Text } from '@marigold/components'; | ||
import { Button, Dialog, Text } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<Dialog.Trigger dismissable={false}> | ||
<Button variant="primary">Open me</Button> | ||
<Dialog closeButton> | ||
<Headline level={3}>Information!</Headline> | ||
<Text>This is a simple info Dialog.</Text> | ||
<Dialog.Title level={3}>Information!</Dialog.Title> | ||
<Dialog.Content> | ||
<Text>This is a simple info Dialog.</Text> | ||
</Dialog.Content> | ||
</Dialog> | ||
</Dialog.Trigger> | ||
); |
33 changes: 14 additions & 19 deletions
33
docs/content/components/overlay/dialog/dialog-form.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.