Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3531596
D5344.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5344.diff
View Options
diff --git a/web/modals/threads/settings/thread-settings-relationship-button.react.js b/web/modals/threads/settings/thread-settings-relationship-button.react.js
--- a/web/modals/threads/settings/thread-settings-relationship-button.react.js
+++ b/web/modals/threads/settings/thread-settings-relationship-button.react.js
@@ -51,22 +51,26 @@
const { username } = otherUserInfo;
invariant(username, 'Other username should be specified');
- let color;
+ let backgroundColor;
if (relationshipButton === relationshipButtons.FRIEND) {
- color = 'success';
+ backgroundColor = '--relationship-button-green';
} else if (relationshipButton === relationshipButtons.UNFRIEND) {
- color = 'danger';
+ backgroundColor = '--relationship-button-red';
} else if (relationshipButton === relationshipButtons.BLOCK) {
- color = 'danger';
+ backgroundColor = '--relationship-button-red';
} else if (relationshipButton === relationshipButtons.UNBLOCK) {
- color = 'success';
+ backgroundColor = '--relationship-button-green';
} else if (relationshipButton === relationshipButtons.ACCEPT) {
- color = 'success';
+ backgroundColor = '--relationship-button-green';
} else if (relationshipButton === relationshipButtons.REJECT) {
- color = 'danger';
+ backgroundColor = '--relationship-button-red';
} else if (relationshipButton === relationshipButtons.WITHDRAW) {
- color = 'danger';
+ backgroundColor = '--relationship-button-red';
}
+ invariant(
+ backgroundColor,
+ 'every relationship type should have a color assigned',
+ );
const { text, action } = React.useMemo(() => {
return {
@@ -129,7 +133,10 @@
return (
<Button
variant="filled"
- buttonColor={color}
+ buttonColor={{
+ backgroundColor: `var(${backgroundColor})`,
+ color: 'var(--relationship-button-text)',
+ }}
onClick={onClick}
disabled={disabled}
>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 7:49 AM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2704360
Default Alt Text
D5344.diff (1 KB)
Attached To
Mode
D5344: [web] Remove hover tint from relationship buttons
Attached
Detach File
Event Timeline
Log In to Comment