Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialog): add 'custom-content' slot #11072

Merged
merged 9 commits into from
Jan 28, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ describe("calcite-dialog", () => {
const page = await newE2EPage();
await page.setContent(
html`<calcite-dialog close-disabled>
<div slot="content">
<div slot="custom-content">
<button id="${button1Id}">Focus1</button>
<button id="${button2Id}">Focus2</button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/calcite-components/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ let initialDocumentOverflowStyle: string = "";

/**
* @slot - A slot for adding content.
* @slot content - A slot for adding custom content.
* @slot content - [Deprecated] Use `custom-content` slot instead.
DitwanP marked this conversation as resolved.
Show resolved Hide resolved
* @slot custom-content - A slot for displaying custom content. Will prevent the rendering of any default Dialog UI, except for `box-shadow` and `corner-radius`.
* @slot action-bar - A slot for adding a `calcite-action-bar` to the component.
* @slot alerts - A slot for adding `calcite-alert`s to the component.
* @slot content-bottom - A slot for adding content below the unnamed (default) slot and - if populated - the `footer` slot.
Expand Down
Loading