MM-56352 - Making modals consistent overall (#25622)

* Modal UI Improvements

* Updating modal header

* Updating modals

* Updating invite as a guest

* Updating modals

* Modal fixes

* Updating modal footer DMs

* Updating footer buttons next prev

* Updating tests

* Updating tests

* Updating modal css

* Updating modal

* Updating UI

* Updating modal snap

* Updating modal issues

* Updating modal

* Updating modal scss

* Updating modal changes

* Updating sys console modal

* Updating modal css

* Updating modal issue

* Removing css file

* Updating test

* Updating modal

* Updating test spec
Этот коммит содержится в:
Asaad Mahmood
2023-12-26 12:36:22 +05:00
коммит произвёл GitHub
родитель 02e27f78b2
Коммит 8f0d2b05ea
88 изменённых файлов: 423 добавлений и 1062 удалений

Просмотреть файл

@@ -62,6 +62,7 @@ exports[`GenericModal should match snapshot for base case 1`] = `
class="GenericModal__header"
>
<h1
class="modal-title"
id="genericModalLabel"
>
Modal Header Text

Просмотреть файл

@@ -29,9 +29,13 @@
.form-control {
height: 40px;
box-sizing: border-box;
border: 2px solid var(--button-bg);
border: 1px solid rgba(var(--center-channel-color-rgb), 0.16);
border-radius: 4px;
&:focus {
border-color: var(--button-bg);
}
&.has-error {
border-color: var(--error-text);
}
@@ -54,9 +58,13 @@
}
}
.input-wrapper {
position: relative;
}
.input-clear {
top: 12px;
right: 36px;
right: 12px;
width: 16px;
height: 16px;
color: var(--center-channel-color);
@@ -68,113 +76,18 @@
}
}
.modal-content {
padding: 16px 15px;
border-radius: 8px;
}
.modal-header {
min-height: 0;
padding: 0;
border: none;
background: transparent;
.close {
top: 6px;
right: 6px;
display: flex;
width: 4rem;
height: 4rem;
align-items: center;
justify-content: center;
border-radius: 4px;
color: rgba(var(--center-channel-color-rgb), 0.56);
font-size: 32px;
font-weight: 400;
&:hover {
background-color: rgba(var(--center-channel-color-rgb), 0.08);
color: rgba(var(--center-channel-color-rgb), 0.72);
}
&:active {
background-color: rgba(var(--button-bg-rgb), 0.08);
color: v(button-bg);
}
}
}
.modal-footer {
padding: 12px 24px 24px 24px;
border: none;
border-radius: 4px;
&.divider {
border-top: 1px solid rgba(var(--center-channel-color-rgb), 0.08);
}
}
&.GenericModal__compassDesign {
.modal-content {
padding: 0;
border-radius: 12px;
.modal-header {
flex-direction: column;
padding: 26px 32px 7px;
.close {
top: 22px;
right: 18px;
width: 40px;
height: 40px;
box-shadow: none;
&:active {
background: rgba(var(--button-bg-rgb), 0.08);
color: var(--button-bg);
}
&:focus {
box-sizing: border-box;
border: 2px solid var(--sidebar-text-active-border);
}
}
.GenericModal__header {
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0;
margin-right: 32px;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
h1 {
color: var(--center-channel-color);
font-size: 22px;
}
}
}
.modal-body {
.GenericModal__body {
padding: 0;
&.padding {
padding: 15px 32px 0;
padding: 8px 32px 0;
}
}
}
.modal-footer {
padding: 24px 32px;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}
.genericModalError {
display: flex;
box-sizing: border-box;
@@ -219,50 +132,3 @@
height: 100%;
}
}
.GenericModal__header {
padding: 28px 24px 16px 24px;
h1 {
margin: 0;
font-size: 20px;
font-weight: 600;
line-height: 28px;
}
}
.GenericModal__body {
position: relative;
width: 100%;
padding: 0 24px;
color: rgba(var(--center-channel-color-rgb), 0.72);
font-family: Open Sans;
font-size: 14px;
font-style: normal;
font-weight: normal;
line-height: 20px;
}
.GenericModal__button {
padding: 12px 16px;
border: none;
font-size: 14px;
font-weight: 600;
line-height: 12px;
&.cancel {
background: var(--center-channel-bg);
color: var(--button-bg);
}
&.confirm {
background: var(--button-bg);
border-radius: 4px;
color: var(--button-color);
&.disabled {
background: rgba(var(--center-channel-color-rgb), 0.08);
color: rgba(var(--center-channel-color-rgb), 0.32);
}
}
}

Просмотреть файл

@@ -164,7 +164,10 @@ export class GenericModal extends React.PureComponent<Props, State> {
const headerText = this.props.modalHeaderText && (
<div className='GenericModal__header'>
<h1 id='genericModalLabel'>
<h1
id='genericModalLabel'
className='modal-title'
>
{this.props.modalHeaderText}
</h1>
{this.props.headerButton}