Skip to content

Commit fa09552

Browse files
committed
Fix disabled clip button now that it has a border
1 parent 35c1989 commit fa09552

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/scripts/clipperUI/panels/optionsPanel.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,22 @@ interface OptionsPanelProps extends ClipperStateProp {
2222
class OptionsPanelClass extends ComponentBase<{ }, OptionsPanelProps> {
2323
render() {
2424
let clipButtonEnabled = ClipperStateHelperFunctions.clipButtonEnabled(this.props.clipperState);
25+
let clipButtonContainerClassName = clipButtonEnabled ? "wideButtonContainer" : "wideButtonContainer disabled";
2526

2627
return (
2728
<div className="optionsPanel">
2829
<ModeButtonSelector clipperState={this.props.clipperState} />
2930
<SectionPicker onPopupToggle={this.props.onPopupToggle.bind(this)} clipperState={this.props.clipperState} />
3031

31-
<div id={Constants.Ids.clipButtonContainer} className="wideButtonContainer">
32+
<div id={Constants.Ids.clipButtonContainer} className={clipButtonContainerClassName}>
3233
{clipButtonEnabled
3334
? <a id={Constants.Ids.clipButton} className="wideActionButton" {...this.enableInvoke(this.props.onStartClip, 1) }>
3435
<span className="wideButtonFont"
3536
style={Localization.getFontFamilyAsStyle(Localization.FontFamily.Semibold)}>
3637
{Localization.getLocalizedString("WebClipper.Action.Clip")}
3738
</span>
3839
</a>
39-
: <a id={Constants.Ids.clipButton} className="wideActionButton disabled">
40+
: <a id={Constants.Ids.clipButton} className="wideActionButton">
4041
<span className="wideButtonFont"
4142
style={Localization.getFontFamilyAsStyle(Localization.FontFamily.Semibold)}>
4243
{Localization.getLocalizedString("WebClipper.Action.Clip")}

src/styles/mainClassDefinitions.less

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@
6565
user-select: text;
6666
}
6767

68-
.disabled {
69-
cursor: default;
70-
background: gray;
71-
border-radius: 4px;
72-
}
73-
7468
.failureMessageFont {
7569
font-weight: normal;
7670
font-size: 18px;
@@ -237,6 +231,12 @@
237231
background: @WideButtonHoverColor;
238232
border-color: @WideButtonHoverColor;
239233
}
234+
235+
&.disabled {
236+
cursor: default;
237+
background: gray;
238+
border-color: gray;
239+
}
240240
}
241241

242242
.wideButtonFont {

0 commit comments

Comments
 (0)