diff --git a/src/components/Dialog/Dialog.scss b/src/components/Dialog/Dialog.scss index 913737b6c2..6118fee8e8 100644 --- a/src/components/Dialog/Dialog.scss +++ b/src/components/Dialog/Dialog.scss @@ -7,9 +7,11 @@ $block: '.#{variables.$ns}dialog'; display: flex; flex-direction: column; - &_with-scroll { + &_has-scroll { overflow-y: auto; - max-height: calc(100vh - var(--yc-modal-margin) * 2); + max-height: calc( + 100vh - calc(var(--g-modal-margin, #{variables.$modal-default-margin})) * 2 + ); } &_size { diff --git a/src/components/Dialog/Dialog.tsx b/src/components/Dialog/Dialog.tsx index 5086a9d058..f47663123a 100644 --- a/src/components/Dialog/Dialog.tsx +++ b/src/components/Dialog/Dialog.tsx @@ -126,7 +126,7 @@ export class Dialog extends React.Component { { size, 'has-close': hasCloseButton, - 'with-scroll': contentOverflow === 'auto', + 'has-scroll': contentOverflow === 'auto', }, className, )} diff --git a/src/components/Dialog/DialogBody/DialogBody.scss b/src/components/Dialog/DialogBody/DialogBody.scss index 741d4f55e7..7b2839379b 100644 --- a/src/components/Dialog/DialogBody/DialogBody.scss +++ b/src/components/Dialog/DialogBody/DialogBody.scss @@ -7,7 +7,7 @@ $block: '.#{variables.$ns}dialog-body'; flex: 1 1 auto; overflow-y: auto; - &_with-dividers { + &_has-dividers { border-block-start: 1px solid var(--g-color-line-generic); border-block-end: 1px solid var(--g-color-line-generic); } diff --git a/src/components/Dialog/DialogBody/DialogBody.tsx b/src/components/Dialog/DialogBody/DialogBody.tsx index d502e7345e..ff60f4f343 100644 --- a/src/components/Dialog/DialogBody/DialogBody.tsx +++ b/src/components/Dialog/DialogBody/DialogBody.tsx @@ -9,11 +9,11 @@ const b = block('dialog-body'); export interface DialogBodyProps { children: React.ReactNode; className?: string; - withDividers?: boolean; + hasDividers?: boolean; } export function DialogBody(props: DialogBodyProps) { - const {className, withDividers = false} = props; + const {className, hasDividers = false} = props; - return
{props.children}
; + return
{props.children}
; } diff --git a/src/components/Modal/Modal.scss b/src/components/Modal/Modal.scss index a5cbe7f9e5..4df22a2c8c 100644 --- a/src/components/Modal/Modal.scss +++ b/src/components/Modal/Modal.scss @@ -16,7 +16,7 @@ $block: '.#{variables.$ns}modal'; -webkit-overflow-scrolling: touch; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - &__content-aligner-wrapper { + &__content-aligner { min-width: 100%; min-height: 100%; @@ -25,17 +25,19 @@ $block: '.#{variables.$ns}modal'; justify-content: center; } - &__content-container { - margin: var(--yc-modal-margin); - background-color: var(--g-color-base-modal); - border-radius: var(--yc-modal-border-radius); + &__content-wrapper { + margin: var(--g-modal-margin, #{variables.$modal-default-margin}); + border-radius: var(--g-modal-border-radius, #{variables.$modal-default-border-radius}); overflow-x: hidden; } &__content { - &_with-scroll { + background-color: var(--g-color-base-modal); + &_has-scroll { overflow-y: auto; - max-height: calc(100vh - (var(--yc-modal-margin) * 2)); + max-height: calc( + 100vh - calc(var(--g-modal-margin, #{variables.$modal-default-margin})) * 2 + ); } } @@ -98,8 +100,3 @@ $block: '.#{variables.$ns}modal'; transform: scale(1); } } - -:root { - --yc-modal-border-radius: 5px; - --yc-modal-margin: 20px; -} diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 45d6eef526..2c220ee022 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -131,8 +131,8 @@ export function Modal({ }} >
-
-
+
+