Skip to content

Commit b32e966

Browse files
author
Mat Jones
committed
add styles for list box components
1 parent 74acff7 commit b32e966

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

src/assets/scss/6-components/molecules/__molecules.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
MOLECULES
33
\*------------------------------------*/
44
@import "card";
5+
@import "drag-and-drop-list-box";
56
@import "dropdown-button";
67
@import "error-banner";
78
@import "form-fields";
89
@import "forms";
10+
@import "list-box";
911
@import "radio-list";
1012
@import "tooltip";
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.c-drag-and-drop-list-box {
2+
&.-dragging-container {
3+
.c-button {
4+
display: none !important;
5+
}
6+
}
7+
8+
.c-list-box__item {
9+
&.-dragging {
10+
@include box-shadow(0px, 7px, 20px, get-color-neutral("30"));
11+
background-color: get-color-neutral("05");
12+
border-radius: $border-radius-small;
13+
border: 1px solid get-color-neutral("30");
14+
15+
.c-button {
16+
display: none;
17+
}
18+
19+
.-drag-handle {
20+
@include icon-fill(get-color-neutral("70"));
21+
}
22+
}
23+
24+
&:hover {
25+
.-drag-handle {
26+
@include icon-fill(get-color-neutral("70"));
27+
}
28+
}
29+
30+
.-drag-handle {
31+
@include icon-fill(get-color-neutral("50"));
32+
@include margin-left(-12px);
33+
@include margin-right(8px);
34+
white-space: nowrap;
35+
36+
svg {
37+
margin-top: 50%;
38+
}
39+
}
40+
}
41+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.c-list-box {
2+
background-color: get-color-neutral("05");
3+
border-radius: $border-radius-small;
4+
border: 1px solid get-color-neutral("30");
5+
6+
&.-empty {
7+
background-color: get-color-neutral("white");
8+
9+
p {
10+
@include padding(16px);
11+
text-align: center;
12+
}
13+
}
14+
15+
&__item {
16+
@include padding(20px, 15px, 15px, 20px);
17+
display: flex;
18+
border-bottom: 1px solid get-color-neutral("30");
19+
20+
&:last-child {
21+
border-bottom: none;
22+
}
23+
24+
&__label {
25+
@include margin-top(4px);
26+
min-width: 12%;
27+
width: 12%;
28+
white-space: nowrap;
29+
30+
@include respond-to("tablet") {
31+
@include margin-right(8px);
32+
}
33+
}
34+
35+
&__text {
36+
flex-grow: 1;
37+
overflow: hidden;
38+
white-space: nowrap;
39+
text-overflow: ellipsis;
40+
41+
a {
42+
@include margin-bottom(8px);
43+
text-decoration: none;
44+
}
45+
}
46+
47+
&__action {
48+
margin-top: auto;
49+
margin-bottom: auto;
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)