Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @prop --calcite-dialog-content-space: Specifies the padding of the component's content.
* @prop --calcite-dialog-footer-space: Specifies the padding of the component's footer.
* @prop --calcite-dialog-border-color: Specifies the component's border color.
* @prop --calcite-dialog-offset-x: Specifies the horizontal offset of the component.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offset makes sense to me!

* @prop --calcite-dialog-offset-y: Specifies the vertical offset of the component.
*/

:host {
Expand Down Expand Up @@ -132,7 +134,8 @@ calcite-panel {
opacity-0
shadow-2-sm
z-modal
rounded;
rounded
relative;
-webkit-overflow-scrolling: touch;
visibility: hidden;
transition:
Expand All @@ -143,6 +146,9 @@ calcite-panel {
--calcite-internal-dialog-hidden-position: translate3d(0, 20px, 0);
--calcite-internal-dialog-shown-position: translate3d(0, 0, 0);

inset-inline-start: var(--calcite-dialog-offset-x);
inset-block-start: var(--calcite-dialog-offset-y);

&--opening {
&-idle {
transform: var(--calcite-internal-dialog-hidden-position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ export const footerSlot = (): string => html`
</calcite-dialog>
`;

const themedStyle = html` --calcite-dialog-scrim-background-color: purple; --calcite-dialog-size-x: 400px;
const themedStyle = html`--calcite-dialog-scrim-background-color: purple; --calcite-dialog-size-x: 400px;
--calcite-dialog-size-y: 400px; --calcite-dialog-footer-space: 50px; --calcite-dialog-border-color: pink;
--calcite-dialog-content-space: 50px;`;
--calcite-dialog-content-space: 50px; --calcite-dialog-offset-x: 50px; --calcite-dialog-offset-y: -30px;`;

export const themed = (): string =>
html`<calcite-dialog
Expand Down