This repository was archived by the owner on Apr 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -4,48 +4,57 @@ import styled from '@emotion/styled'
4
4
import { colors } from '../../styles/variables'
5
5
import { PricingBoxesProps } from './PricingBoxes'
6
6
7
- const Tab = styled . button `
7
+ const Tab = styled . button < { isRendered : boolean } > `
8
8
display: block;
9
9
padding: 1.3rem 2rem;
10
10
font-size: 18px;
11
11
color: ${ colors . textLight } ;
12
12
min-width: 15rem;
13
13
text-align: center;
14
- background-color: ${ colors . white } ;
15
14
border: 1px solid ${ colors . offWhite2 } ;
15
+ border-radius: 6px 6px 0 0;
16
16
border-bottom-color: transparent;
17
17
margin-bottom: -1px;
18
18
cursor: pointer;
19
+ transition: all .1s;
19
20
20
21
&:first-of-type {
22
+ background-color: ${ ( { isRendered } ) => isRendered ? colors . offWhite2 : colors . white } ;
21
23
border-right: none;
22
24
}
23
25
24
26
&:last-of-type {
27
+ background-color: ${ ( { isRendered } ) => isRendered ? colors . white : colors . offWhite2 } ;
25
28
border-left: none;
26
29
}
27
30
28
31
body.user-is-tabbing &:focus {
29
32
outline: none;
30
33
border: 1px solid #1AA6E4;;
31
34
}
35
+
36
+ &:hover {
37
+ color: ${ colors . link } ;
38
+ }
32
39
`
33
40
34
41
const Tabs = ( { isRendered, changeIsRendered } : PricingBoxesProps ) => (
35
42
< div style = { {
36
43
display : 'flex' ,
37
44
justifyContent : 'center'
38
45
} } >
39
- < Tab style = { {
40
- backgroundColor : isRendered ? colors . offWhite2 : colors . white ,
41
- } }
46
+ < Tab
47
+ isRendered = { isRendered }
42
48
onClick = { ( ) => changeIsRendered ( false ) }
43
- > Cloud</ Tab >
44
- < Tab style = { {
45
- backgroundColor : isRendered ? colors . white : colors . offWhite2 ,
46
- } }
49
+ >
50
+ Cloud
51
+ </ Tab >
52
+ < Tab
53
+ isRendered = { isRendered }
47
54
onClick = { ( ) => changeIsRendered ( true ) }
48
- > Self-Hosted</ Tab >
55
+ >
56
+ Self-Hosted
57
+ </ Tab >
49
58
</ div >
50
59
)
51
60
You can’t perform that action at this time.
0 commit comments