amis/packages/amis-ui/scss/components/_array-input.scss

102 lines
1.9 KiB
SCSS
Raw Normal View History

2020-06-12 11:07:34 +08:00
.#{$ns}ArrayInput {
&-placeholder {
color: var(--text--muted-color);
padding-top: var(--Form-label-paddingTop);
2020-06-12 11:07:34 +08:00
}
&-addBtn {
> svg {
width: var(--Combo-addBtn-fontSize);
height: var(--Combo-addBtn-fontSize);
2020-06-12 11:07:34 +08:00
}
font-size: var(--Combo-addBtn-fontSize);
2020-06-12 11:07:34 +08:00
@include button-size(
var(--Combo-addBtn-paddingY),
var(--Combo-addBtn-paddingX),
var(--Combo-addBtn-fontSize),
var(--Combo-addBtn-lineHeight),
var(--Combo-addBtn-borderRadius),
var(--Combo-addBtn-height)
2020-06-12 11:07:34 +08:00
);
@include button-variant(
var(--Combo-addBtn-bg),
var(--Combo-addBtn-border),
var(--Combo-addBtn-color),
var(--Combo-addBtn-onHover-bg),
var(--Combo-addBtn-onHover-border),
var(--Combo-addBtn-onHover-color),
var(--Combo-addBtn-onActive-bg),
var(--Combo-addBtn-onActive-border),
var(--Combo-addBtn-onActive-color)
2020-06-12 11:07:34 +08:00
);
&.is-disabled {
pointer-events: none;
opacity: var(--Button-onDisabled-opacity);
2020-06-12 11:07:34 +08:00
}
}
&-toolbar {
margin-top: var(--gap-sm);
2020-06-12 11:44:04 +08:00
&--dnd {
padding-left: 29px;
}
display: flex;
flex-direction: row;
justify-content: space-between;
}
&-sortTip {
color: var(--text--muted-color);
2020-06-12 11:07:34 +08:00
}
&-item {
display: flex;
flex-direction: row;
align-items: flex-start;
margin-bottom: var(--gap-xs);
2020-06-12 11:07:34 +08:00
> div {
flex-grow: 1;
width: 0;
min-width: 120px;
margin-right: var(--gap-xs);
2020-06-12 11:07:34 +08:00
&:not(:first-child) {
margin-left: var(--gap-xs);
2020-06-12 11:07:34 +08:00
}
}
&--dragging {
position: relative;
opacity: 0.4;
}
}
&-itemRemove,
&-itemDrager {
margin: 0;
flex-grow: unset;
display: inline-block;
padding: var(--Form-label-paddingTop) var(--gap-xs);
2020-06-12 11:07:34 +08:00
cursor: pointer;
> svg {
color: var(--icon-color);
2020-06-12 11:07:34 +08:00
}
&:hover > svg {
color: var(--icon-onHover-color);
2020-06-12 11:07:34 +08:00
}
}
&-itemDrager {
cursor: move;
}
}