|
1 | 1 | import styled, { css, createGlobalStyle } from 'styled-components' |
2 | 2 |
|
3 | | -export const GlobalStyle = createGlobalStyle` |
4 | | -
|
5 | | - .popover { |
6 | | - position: absolute; |
7 | | - right: 10px; |
8 | | - } |
9 | | - .popover .popover__content { |
10 | | - visibility: hidden; |
11 | | - margin-top: -5px; |
12 | | - opacity: 0; |
13 | | - position: absolute; |
14 | | - z-index: 10; |
15 | | - box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3); |
16 | | - transition: all 0.3s ease 0ms; |
17 | | - border-radius: 3px; |
18 | | - min-width: 7em; |
19 | | - flex-flow: column nowrap; |
20 | | - background-color: #fff; |
21 | | - color: #000; |
22 | | - padding: 5px; } |
23 | | - .popover .popover__content::before { |
24 | | - content: ""; |
25 | | - position: absolute; |
26 | | - background: transparent none repeat scroll 0 0; |
27 | | - border: 6px solid transparent; |
28 | | - transition: all 0.3s ease 0ms; |
29 | | - left: 50%; } |
30 | | - .popover.popover--bottom { |
31 | | - flex-flow: column nowrap; } |
32 | | - .popover.popover--bottom .popover__content { |
33 | | - left: 50%; |
34 | | - transform: translateX(-50%); } |
35 | | -
|
36 | | - .popover.popover--active .popover__content { |
37 | | - visibility: visible; |
38 | | - opacity: 1; |
39 | | - transition-delay: 100ms; } |
40 | | - .popover[class*="menu"] .popover__content { |
41 | | - border-radius: 3px; |
42 | | - min-width: 7em; |
43 | | - flex-flow: column nowrap; |
44 | | - color: #000; } |
45 | | - .popover[class*="menu"] .popover__content a { |
46 | | - color: rgba(255, 255, 255, 0.56); |
47 | | - padding: .5em 1em; |
48 | | - margin: 0; |
49 | | - text-decoration: none; } |
50 | | - .popover[class*="menu"] .popover__content a:hover { |
51 | | - background-color: #00bcd4 !important; |
52 | | - color: #37474F; } |
53 | | -
|
| 3 | +import { |
| 4 | + PopoverContainer, |
| 5 | + PopoverContent, |
| 6 | + PopoverTrigger |
| 7 | +} from 'react-popopo' |
54 | 8 |
|
| 9 | +export const GlobalStyle = createGlobalStyle` |
55 | 10 | .comPlainTextContentEditable { |
56 | 11 | -webkit-user-modify: read-write-plaintext-only; |
57 | 12 | cursor: text; |
@@ -86,6 +41,48 @@ export const GlobalStyle = createGlobalStyle` |
86 | 41 | } |
87 | 42 | ` |
88 | 43 |
|
| 44 | +export const CustomPopoverContainer = styled(PopoverContainer)` |
| 45 | + position: absolute; |
| 46 | + right: 10px; |
| 47 | + flex-flow: column nowrap; |
| 48 | +` |
| 49 | + |
| 50 | +export const CustomPopoverContent = styled(PopoverContent)` |
| 51 | + visibility: hidden; |
| 52 | + margin-top: -5px; |
| 53 | + opacity: 0; |
| 54 | + position: absolute; |
| 55 | + z-index: 10; |
| 56 | + box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3); |
| 57 | + transition: all 0.3s ease 0ms; |
| 58 | + border-radius: 3px; |
| 59 | + min-width: 7em; |
| 60 | + flex-flow: column nowrap; |
| 61 | + background-color: #fff; |
| 62 | + color: #000; |
| 63 | + padding: 5px; |
| 64 | + left: 50%; |
| 65 | + transform: translateX(-50%); |
| 66 | + ${props => props.active && ` |
| 67 | + visibility: visible; |
| 68 | + opacity: 1; |
| 69 | + transition-delay: 100ms; |
| 70 | + `} |
| 71 | + &::before { |
| 72 | + visibility: hidden; |
| 73 | + } |
| 74 | + a { |
| 75 | + color: rgba(255, 255, 255, 0.56); |
| 76 | + padding: .5em 1em; |
| 77 | + margin: 0; |
| 78 | + text-decoration: none; |
| 79 | + &:hover { |
| 80 | + background-color: #00bcd4 !important; |
| 81 | + color: #37474F; |
| 82 | + } |
| 83 | + } |
| 84 | +` |
| 85 | + |
89 | 86 | export const BoardWrapper = styled.div` |
90 | 87 | background-color: #3179ba; |
91 | 88 | overflow-y: hidden; |
|
0 commit comments