mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-03-12 02:39:13 +05:30
Реорганизованы стили попапов
This commit is contained in:
parent
eee2c803af
commit
7a42e11946
@ -38,6 +38,7 @@ class ContactForm extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.contactForm}>
|
<div className={styles.contactForm}>
|
||||||
|
<div className={popupStyles.popup}>
|
||||||
<div className={popupStyles.header}>
|
<div className={popupStyles.header}>
|
||||||
<h2 className={popupStyles.headerTitle}>
|
<h2 className={popupStyles.headerTitle}>
|
||||||
<Message {...messages.title} />
|
<Message {...messages.title} />
|
||||||
@ -94,6 +95,7 @@ class ContactForm extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
@import '~components/ui/popup/popup.scss';
|
@import '~components/ui/popup/popup.scss';
|
||||||
|
|
||||||
.contactForm {
|
.contactForm {
|
||||||
|
composes: popupWrapper from 'components/ui/popup/popup.scss';
|
||||||
|
|
||||||
|
@include popupBounding(500px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.philosophicalThought {
|
.philosophicalThought {
|
||||||
|
@ -22,6 +22,8 @@ export default class PasswordRequestForm extends Component {
|
|||||||
const {form} = this.props;
|
const {form} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div className={styles.requestPasswordForm}>
|
||||||
|
<div className={popupStyles.popup}>
|
||||||
<Form onSubmit={this.onFormSubmit}
|
<Form onSubmit={this.onFormSubmit}
|
||||||
form={form}
|
form={form}
|
||||||
>
|
>
|
||||||
@ -54,6 +56,8 @@ export default class PasswordRequestForm extends Component {
|
|||||||
type="submit"
|
type="submit"
|
||||||
/>
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
@import '~components/ui/popup/popup.scss';
|
||||||
|
|
||||||
|
.requestPasswordForm {
|
||||||
|
composes: popupWrapper from 'components/ui/popup/popup.scss';
|
||||||
|
|
||||||
|
@include popupBounding(280px);
|
||||||
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -41,12 +41,8 @@ export class PopupStack extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.overlay} key={index} onClick={this.onOverlayClick(popup, props)}>
|
<div className={styles.overlay} key={index} onClick={this.onOverlayClick(popup, props)}>
|
||||||
<div className={styles.popupWrapper}>
|
|
||||||
<div className={styles.popup}>
|
|
||||||
<Popup {...props} />
|
<Popup {...props} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ReactCSSTransitionGroup>
|
</ReactCSSTransitionGroup>
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
@import '~components/ui/colors.scss';
|
@import '~components/ui/colors.scss';
|
||||||
@import '~components/ui/fonts.scss';
|
@import '~components/ui/fonts.scss';
|
||||||
|
|
||||||
$popupPadding: 20px;
|
$popupPadding: 20px; // Отступ контента внутри попапа
|
||||||
|
$popupMargin: 20px; // Отступ попапа от краёв окна
|
||||||
|
|
||||||
|
@mixin popupBounding($width, $padding: null) {
|
||||||
|
@if ($padding == null) {
|
||||||
|
$padding: $popupMargin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@if ($padding != $popupMargin) {
|
||||||
|
margin: $padding auto;
|
||||||
|
padding: 0 $padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
max-width: $width;
|
||||||
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -32,15 +46,12 @@ $popupPadding: 20px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popupWrapper {
|
.popupWrapper {
|
||||||
$padding: 20px;
|
box-sizing: content-box;
|
||||||
$maxPopupWidth: 500px;
|
margin: $popupMargin auto;
|
||||||
|
padding: 0 $popupMargin;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: $maxPopupWidth + $padding * 2;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: $padding auto;
|
|
||||||
padding: 0 $padding;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user