Skip to content

Commit 7320580

Browse files
committed
Cosmetic improvements.
1 parent 7e37e6e commit 7320580

File tree

3 files changed

+58
-10
lines changed

3 files changed

+58
-10
lines changed

src/components/PatronBlockingRulesEditor.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,16 @@ export default class PatronBlockingRulesEditor extends React.Component<
9494

9595
return (
9696
<div className="patron-blocking-rules-editor">
97-
<label className="control-label">Patron Blocking Rules</label>
97+
<div className="patron-blocking-rules-header">
98+
<label className="control-label">Patron Blocking Rules</label>
99+
<Button
100+
type="button"
101+
className="add-patron-blocking-rule"
102+
disabled={disabled}
103+
callback={this.addRule}
104+
content="Add Rule"
105+
/>
106+
</div>
98107
{rules.length === 0 && (
99108
<p className="no-rules-message">No patron blocking rules defined.</p>
100109
)}
@@ -140,8 +149,7 @@ export default class PatronBlockingRulesEditor extends React.Component<
140149
}
141150
/>
142151
<EditableInput
143-
elementType="input"
144-
type="text"
152+
elementType="textarea"
145153
label="Message (optional)"
146154
name={`patron_blocking_rule_message_${index}`}
147155
value={rule.message || ""}
@@ -158,13 +166,6 @@ export default class PatronBlockingRulesEditor extends React.Component<
158166
);
159167
})}
160168
</ul>
161-
<Button
162-
type="button"
163-
className="add-patron-blocking-rule"
164-
disabled={disabled}
165-
callback={this.addRule}
166-
content="Add Rule"
167-
/>
168169
</div>
169170
);
170171
}

src/stylesheets/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ $fontfamily: 'Open Sans', sans-serif;
5050
@import "manage_patrons";
5151
@import "paired_menu";
5252
@import "password_input";
53+
@import "patron_blocking_rules_editor";
5354
@import "protocol_form_field";
5455
@import "self_tests";
5556
@import "set_up";
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.patron-blocking-rules-editor {
2+
border-top: 1px solid $gray-border;
3+
margin-top: 20px;
4+
padding-top: 16px;
5+
padding-bottom: 20px;
6+
margin-bottom: 20px;
7+
border-bottom: 1px solid $gray-border;
8+
9+
.patron-blocking-rules-header {
10+
display: flex;
11+
flex-direction: row;
12+
align-items: center;
13+
justify-content: space-between;
14+
margin-bottom: 8px;
15+
16+
.control-label {
17+
margin-bottom: 0;
18+
}
19+
20+
.add-patron-blocking-rule {
21+
margin: 0;
22+
}
23+
}
24+
25+
.no-rules-message {
26+
color: $medium-dark-gray;
27+
font-style: italic;
28+
margin: 8px 0 0;
29+
}
30+
31+
.patron-blocking-rules-list {
32+
margin: 0;
33+
padding: 0;
34+
}
35+
36+
.patron-blocking-rule-row {
37+
border-bottom: 1px solid $medium-gray;
38+
padding-bottom: 12px;
39+
margin-bottom: 0;
40+
41+
&:last-child {
42+
border-bottom: none;
43+
padding-bottom: 0;
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)