Skip to content

Commit 23e800a

Browse files
author
Wesley
committed
add styles for popup menu widget
1 parent 2b7f1a5 commit 23e800a

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.popupmenu {
2+
position: relative;
3+
display: inline-flex;
4+
}
5+
6+
.popupmenu-trigger {
7+
}
8+
9+
.popupmenu-menu {
10+
position: absolute;
11+
z-index: 999;
12+
display: none;
13+
flex-direction: column;
14+
width: max-content;
15+
border: 1px solid $border-color-default;
16+
border-radius: 8px;
17+
background-color: $bg-color;
18+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
19+
20+
&.popupmenu-position-left {
21+
left: 0;
22+
transform: translateX(-100%);
23+
}
24+
25+
&.popupmenu-position-right {
26+
right: 0;
27+
transform: translateX(100%);
28+
}
29+
30+
&.popupmenu-position-top {
31+
top: 0;
32+
transform: translateY(-100%);
33+
}
34+
35+
&.popupmenu-position-bottom {
36+
bottom: 0;
37+
transform: translateY(100%);
38+
}
39+
40+
.popupmenu-custom-item:first-child {
41+
border-top-left-radius: 8px;
42+
border-top-right-radius: 8px;
43+
}
44+
45+
.popupmenu-custom-item:last-child {
46+
border-bottom-right-radius: 8px;
47+
border-bottom-left-radius: 8px;
48+
}
49+
}
50+
51+
.popupmenu-basic-divider {
52+
width: 100%;
53+
height: 1px;
54+
background-color: $brand-default;
55+
}
56+
57+
.popupmenu-basic-item {
58+
padding: 8px 16px;
59+
color: $font-color-default;
60+
font-size: 14px;
61+
62+
&:hover,
63+
&:focus,
64+
&:active {
65+
cursor: pointer;
66+
border-color: $bg-color-secondary;
67+
background-color: $bg-color-secondary;
68+
}
69+
70+
&-primary {
71+
color: $brand-default;
72+
}
73+
74+
&-danger {
75+
color: $brand-danger;
76+
}
77+
}
78+
79+
.popupmenu-custom-item {
80+
&:hover,
81+
&:focus,
82+
&:active {
83+
cursor: pointer;
84+
border-color: $bg-color-secondary;
85+
background-color: $bg-color-secondary;
86+
}
87+
}

0 commit comments

Comments
 (0)