Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3749238
D6056.id20449.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
D6056.id20449.diff
View Options
diff --git a/web/chat/message-like-tooltip-button.css b/web/chat/message-like-tooltip-button.css
new file mode 100644
--- /dev/null
+++ b/web/chat/message-like-tooltip-button.css
@@ -0,0 +1,5 @@
+span.containerViewerLiked {
+ padding: 4px;
+ border-radius: 4px;
+ background-color: var(--message-action-tooltip-bg-light);
+}
diff --git a/web/chat/message-like-tooltip-button.react.js b/web/chat/message-like-tooltip-button.react.js
new file mode 100644
--- /dev/null
+++ b/web/chat/message-like-tooltip-button.react.js
@@ -0,0 +1,22 @@
+// @flow
+
+import classNames from 'classnames';
+import * as React from 'react';
+
+import css from './message-like-tooltip-button.css';
+
+type ReactTooltipButtonProps = {
+ +viewerReacted: boolean,
+};
+
+function MessageLikeTooltipButton(props: ReactTooltipButtonProps): React.Node {
+ const { viewerReacted } = props;
+
+ const containerClassNames = classNames({
+ [css.containerViewerLiked]: viewerReacted,
+ });
+
+ return <span className={containerClassNames}>👍</span>;
+}
+
+export default MessageLikeTooltipButton;
diff --git a/web/chat/message-tooltip.css b/web/chat/message-tooltip.css
--- a/web/chat/message-tooltip.css
+++ b/web/chat/message-tooltip.css
@@ -25,7 +25,8 @@
color: var(--color-disabled);
}
-div.messageActionButtons svg:hover {
+div.messageActionButtons svg:hover,
+div.messageActionButtons span:hover {
cursor: pointer;
color: var(--fg);
}
diff --git a/web/theme.css b/web/theme.css
--- a/web/theme.css
+++ b/web/theme.css
@@ -113,6 +113,7 @@
--thread-ancestor-separator-color: var(--shades-white-60);
--text-message-default-background: var(--shades-black-80);
--message-action-tooltip-bg: var(--shades-black-90);
+ --message-action-tooltip-bg-light: var(--shades-black-80);
--menu-bg: var(--shades-black-90);
--menu-bg-light: var(--shades-black-80);
--menu-separator-color: var(--shades-black-80);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 8:57 PM (18 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2855358
Default Alt Text
D6056.id20449.diff (1 KB)
Attached To
Mode
D6056: [web] intoduce MessageLikeTooltipButton component
Attached
Detach File
Event Timeline
Log In to Comment