File tree Expand file tree Collapse file tree 3 files changed +25
-18
lines changed Expand file tree Collapse file tree 3 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 14
14
border : none ;
15
15
padding : 0 20px ;
16
16
17
+ // don't underline if button is done as a link
18
+ & :hover {
19
+ text-decoration : none ;
20
+ }
21
+
22
+ // hide outline for buttons and links
23
+ & :focus ,
24
+ & :active ,
25
+ & :visited {
26
+ outline : none ;
27
+ }
28
+
17
29
span {
18
30
color : $white ;
19
31
}
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import AlertModal from '../Modal/AlertModal'
44
44
import PhaseInput from '../PhaseInput'
45
45
import LegacyLinks from '../LegacyLinks'
46
46
import AssignedMemberField from './AssignedMember-Field'
47
+ import Tooltip from '../Tooltip'
47
48
48
49
const theme = {
49
50
container : styles . modalContainer
@@ -1193,9 +1194,18 @@ class ChallengeEditor extends Component {
1193
1194
< div className = { styles . button } >
1194
1195
< PrimaryButton text = { 'Save Draft' } type = { 'info' } onClick = { this . createDraftHandler } />
1195
1196
</ div >
1196
- { isDraft && < div className = { styles . button } >
1197
- < PrimaryButton text = { 'Launch as Active' } type = { 'info' } onClick = { this . toggleLaunch } />
1198
- </ div > }
1197
+ { isDraft && (
1198
+ < div className = { styles . button } >
1199
+ { challenge . legacyId ? (
1200
+ < PrimaryButton text = { 'Launch as Active' } type = { 'info' } onClick = { this . toggleLaunch } />
1201
+ ) : (
1202
+ < Tooltip content = 'Legacy project is not yet created' >
1203
+ { /* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */ }
1204
+ < PrimaryButton text = { 'Launch as Active' } type = { 'disabled' } />
1205
+ </ Tooltip >
1206
+ ) }
1207
+ </ div >
1208
+ ) }
1199
1209
</ div > }
1200
1210
{ ! isLoading && isActive && < div className = { styles . buttonContainer } >
1201
1211
{ /* <div className={styles.button}>
Original file line number Diff line number Diff line change 13
13
outline : none ;
14
14
white-space : nowrap ;
15
15
}
16
-
17
- a {
18
- & :hover {
19
- text-decoration : none ;
20
- }
21
- & :focus ,
22
- & :active ,
23
- & :visited {
24
- outline : none ;
25
- }
26
-
27
- button :focus {
28
- outline : none ;
29
- }
30
- }
31
16
}
You can’t perform that action at this time.
0 commit comments