Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3524082
D9409.id31769.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
D9409.id31769.diff
View Options
diff --git a/web/modals/user-profile/user-profile.css b/web/modals/user-profile/user-profile.css
new file mode 100644
--- /dev/null
+++ b/web/modals/user-profile/user-profile.css
@@ -0,0 +1,31 @@
+.container {
+ display: flex;
+ align-items: center;
+ padding: 0 32px 32px;
+}
+
+.usernameContainer {
+ padding-left: 16px;
+}
+
+.usernameText {
+ font-size: var(--xxl-font-24);
+ color: var(--fg);
+ font-weight: 500;
+}
+
+.copyUsernameContainer {
+ display: flex;
+ align-items: center;
+ color: var(--purple-link);
+ margin-top: 8px;
+}
+
+.copyUsernameContainer:hover {
+ cursor: pointer;
+}
+
+.copyUsernameText {
+ font-size: var(--xs-font-12);
+ margin-left: 4px;
+}
diff --git a/web/modals/user-profile/user-profile.react.js b/web/modals/user-profile/user-profile.react.js
new file mode 100644
--- /dev/null
+++ b/web/modals/user-profile/user-profile.react.js
@@ -0,0 +1,35 @@
+// @flow
+
+import * as React from 'react';
+
+import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
+import { stringForUserExplicit } from 'lib/shared/user-utils.js';
+import type { UserInfo } from 'lib/types/user-types';
+
+import css from './user-profile.css';
+import UserAvatar from '../../avatars/user-avatar.react.js';
+
+type Props = {
+ +userInfo: ?UserInfo,
+};
+
+function UserProfile(props: Props): React.Node {
+ const { userInfo } = props;
+
+ const usernameText = stringForUserExplicit(userInfo);
+
+ return (
+ <div className={css.container}>
+ <UserAvatar userID={userInfo?.id} size="L" />
+ <div className={css.usernameContainer}>
+ <div className={css.usernameText}>{usernameText}</div>
+ <div className={css.copyUsernameContainer}>
+ <SWMansionIcon icon="copy" size={16} />
+ <p className={css.copyUsernameText}>Copy username</p>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export default UserProfile;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 11:13 AM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699797
Default Alt Text
D9409.id31769.diff (1 KB)
Attached To
Mode
D9409: [web] introduce UserProfile component
Attached
Detach File
Event Timeline
Log In to Comment