diff --git a/src/containers/profile/ProfileAvatar/index.tsx b/src/containers/profile/ProfileAvatar/index.tsx index 0e549a40..cc6a99e1 100644 --- a/src/containers/profile/ProfileAvatar/index.tsx +++ b/src/containers/profile/ProfileAvatar/index.tsx @@ -16,6 +16,7 @@ import { import path from "ramda/es/path"; import * as UPLOAD_ACTIONS from "~/redux/uploads/actions"; import * as AUTH_ACTIONS from "~/redux/auth/actions"; +import { Icon } from "~/components/input/Icon"; const mapStateToProps = state => ({ user: pick(["id"], selectAuthUser(state)), @@ -94,6 +95,11 @@ const ProfileAvatarUnconnected: FC = ({ }} > {can_edit && } + {can_edit && ( +
+ +
+ )} ); }; diff --git a/src/containers/profile/ProfileAvatar/styles.scss b/src/containers/profile/ProfileAvatar/styles.scss index c6fbb6dc..5eac9c5d 100644 --- a/src/containers/profile/ProfileAvatar/styles.scss +++ b/src/containers/profile/ProfileAvatar/styles.scss @@ -8,4 +8,49 @@ position: absolute; bottom: 0; left: $gap; + cursor: pointer; + + input { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + } + + &:hover { + svg { + fill: $red; + } + } +} + +.can_edit { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + pointer-events: none; + touch-action: none; + // background: red; + display: flex; + align-items: flex-end; + justify-content: flex-end; + padding: $gap / 2; + box-sizing: border-box; + background: linear-gradient( + 330deg, + $content_bg, + transparentize($content_bg, 1) + ); + border-radius: $radius; + + svg { + width: 32px; + height: 32px; + fill: white; + transition: fill 0.25s; + } } diff --git a/src/sprites/Sprites.tsx b/src/sprites/Sprites.tsx index e2618518..0efcf940 100644 --- a/src/sprites/Sprites.tsx +++ b/src/sprites/Sprites.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import React, { FC } from "react"; const Sprites: FC<{}> = () => ( @@ -186,6 +186,11 @@ const Sprites: FC<{}> = () => ( + + + + + );