chowa
Version:
UI component library based on React
237 lines (203 loc) • 4.61 kB
CSS
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@keyframes cw-fade {
0% {
opacity: 0; }
100% {
opacity: 1; } }
.cw-modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.45);
margin: 0;
padding: 0; }
.cw-modal-wrapper {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: 0;
padding: 0;
display: flex; }
.cw-modal-middle {
align-items: center; }
.cw-modal-top {
align-items: flex-start; }
.cw-modal-top .cw-modal {
margin-top: 18px;
margin-bottom: 18px; }
.cw-modal-bottom {
align-items: flex-end; }
.cw-modal-bottom .cw-modal {
margin-top: 18px;
margin-bottom: 18px; }
.cw-modal-center {
justify-content: center; }
.cw-modal-start {
justify-content: flex-start; }
.cw-modal-start .cw-modal {
margin-left: 18px;
margin-right: 18px; }
.cw-modal-end {
justify-content: flex-end; }
.cw-modal-end .cw-modal {
margin-left: 18px;
margin-right: 18px; }
.cw-modal {
background-color: #fff;
border-radius: 3px;
overflow: hidden;
margin: 0;
padding: 0;
width: 580px;
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.15); }
.cw-modal-header {
margin: 0;
box-sizing: border-box;
display: flex;
padding: 0 18px;
font-size: 14px;
height: 48px;
line-height: 48px; }
.cw-modal-header-title {
flex: auto;
color: #414a63;
margin: 0;
padding: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.cw-modal-header-close {
margin: 0;
padding: 0;
outline: none;
border: none;
background: transparent;
transition: color 0.2s ease-in;
cursor: pointer;
color: #616a6e; }
.cw-modal-header-close:hover {
color: #414a63; }
.cw-modal-body {
max-height: 70vh;
margin: 0;
box-sizing: border-box;
padding: 16px 18px;
font-size: 14px;
color: #616a6e;
overflow-x: hidden;
overflow-y: auto; }
.cw-modal-body.cw-modal-body-media {
padding: 0; }
.cw-modal-footer {
display: flex;
margin: 0;
padding: 8px 18px;
line-height: 1;
box-sizing: border-box;
align-items: center; }
.cw-modal-footer.cw-modal-footer-end {
justify-content: flex-end; }
.cw-modal-footer.cw-modal-footer-start {
justify-content: flex-start; }
.cw-modal-bordered .cw-modal-header {
border-bottom: 1px solid #e6ecf5; }
.cw-modal-bordered .cw-modal-footer {
border-top: 1px solid #e6ecf5; }
.cw-modal-alert,
.cw-modal-confirm,
.cw-modal-prompt {
width: 380px; }
.cw-modal-alert-body,
.cw-modal-confirm-body {
display: flex;
flex-direction: row;
margin: 0;
padding: 10px;
box-sizing: border-box; }
.cw-modal-prompt-body {
margin: 0;
padding: 10px;
box-sizing: border-box; }
.cw-modal-prompt-title-wrapper {
display: flex;
flex-direction: row;
margin: 0;
padding: 0 0 14px 0; }
.cw-modal-alert-icon,
.cw-modal-confirm-icon,
.cw-modal-prompt-icon {
font-size: 22px;
margin: 0 12px 0 0;
padding: 0;
flex: none; }
.cw-modal-alert-info,
.cw-modal-prompt-icon {
color: #1890ff; }
.cw-modal-alert-success {
color: #52c41a; }
.cw-modal-alert-error {
color: #f5222d; }
.cw-modal-confirm-icon,
.cw-modal-alert-warning {
color: #faad14; }
.cw-modal-alert-message,
.cw-modal-confirm-message {
margin: 0;
padding: 0;
box-sizing: border-box;
flex: auto; }
.cw-modal-alert-title,
.cw-modal-confirm-title,
.cw-modal-prompt-title {
color: #414a63;
padding: 8px 0;
margin: 0;
line-height: 1;
box-sizing: border-box; }
.cw-modal-alert-content,
.cw-modal-confirm-content,
.cw-modal-prompt-content {
line-height: 1.5;
margin: 6px 0 0 0;
padding: 0;
box-sizing: border-box; }
.cw-modal-alert-btns,
.cw-modal-confirm-btns,
.cw-modal-prompt-btns {
display: flex;
align-items: center;
justify-content: flex-end;
margin: 0;
padding: 8px 10px; }
@keyframes cw-modal-trans {
0% {
transform: scale(0); }
100% {
transform: scale(1); } }
.cw-modal-enter {
animation-name: cw-fade; }
.cw-modal-enter .cw-modal {
animation-name: cw-modal-trans; }
.cw-modal-leave {
animation-name: cw-fade;
animation-direction: reverse; }
.cw-modal-leave .cw-modal {
animation-name: cw-modal-trans;
animation-direction: reverse; }
.cw-modal-appear {
animation-duration: 0.3s;
animation-timing-function: ease-in-out; }
.cw-modal-appear .cw-modal {
animation-duration: 0.3s;
animation-timing-function: ease-in-out; }