@@ -15,22 +15,10 @@ export enum hexagonBackground {
15
15
16
16
export default function Hexagon ( { children, size, color } : any ) {
17
17
return (
18
- < div className = "border-container" >
19
- < div className = { `hexagon-container ${ color } ` } >
20
- < div className = "content" > { children } </ div >
21
- </ div >
18
+ < div className = { `hexagon-container ${ color } ` } >
19
+ < div className = "content" > { children } </ div >
22
20
< style jsx >
23
21
{ `
24
- .border-container {
25
- position: relative;
26
- display: flex;
27
- justify-content: center;
28
- align-items: center;
29
- width: ${ size * 0.645 * 1.1 } rem;
30
- height: ${ size * 1.1 } rem;
31
- background: #ddd;
32
- border-radius: ${ size / 8 } rem;
33
- }
34
22
.hexagon-container {
35
23
position: relative;
36
24
width: ${ size * 0.645 } rem;
@@ -39,14 +27,13 @@ export default function Hexagon({ children, size, color }: any) {
39
27
display: flex;
40
28
justify-content: center;
41
29
align-items: center;
30
+ filter: drop-shadow(0.25rem 0.25rem 0.25rem rgba(0, 0, 0, 0.5));
42
31
}
43
32
.hexagon-container,
44
33
.hexagon-container:before,
45
34
.hexagon-container:after {
46
35
z-index: 1;
47
36
}
48
- .border-container:before,
49
- .border-container:after,
50
37
.hexagon-container:before,
51
38
.hexagon-container:after {
52
39
position: absolute;
@@ -61,11 +48,9 @@ export default function Hexagon({ children, size, color }: any) {
61
48
bottom: 0;
62
49
margin: auto;
63
50
}
64
- .border-container:before,
65
51
.hexagon-container:before {
66
52
transform: rotate(60deg);
67
53
}
68
- .border-container:after,
69
54
.hexagon-container:after {
70
55
transform: rotate(-60deg);
71
56
}
0 commit comments