Skip to content

Commit

Permalink
chore: replace svg with png, add opacity animation to floating bar
Browse files Browse the repository at this point in the history
  • Loading branch information
1emu committed Sep 20, 2023
1 parent 4e93bed commit 729750f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 47 deletions.
14 changes: 13 additions & 1 deletion src/components/FloatingBar/FloatingBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
display: flex;
justify-content: space-between;
align-items: center;
opacity: 0;
transition: all 0.5s ease 0s;
}

.FloatingBar--visible {
opacity: 1;
}

.FloatingBar__ProposalSectionActions {
Expand All @@ -27,8 +33,14 @@
line-height: 24px;
font-weight: var(--weight-semi-bold);
text-transform: uppercase;
display: flex;
gap: 5px;
display: flex;
align-items: center;
}

.FloatingBar__ReactionsImg {
height: 24px;
width: 36px;
}

.FloatingBar__JoinDiscussion {
Expand Down
9 changes: 5 additions & 4 deletions src/components/FloatingBar/FloatingBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import useProposalComments from '../../hooks/useProposalComments'
import Link from '../Common/Typography/Link'
import Forum from '../Icon/Forum'
import Open from '../Icon/Open'
import Reactions from '../Icon/Reactions'

import './FloatingBar.css'

const reactions = require('../../images/reactions.png').default

interface FloatingBarProps {
isVisible: boolean
showViewReactions: boolean
Expand All @@ -35,14 +36,14 @@ const FloatingBar: React.FC<FloatingBarProps> = ({
}) => {
const t = useFormatMessage()
const { comments, isLoadingComments } = useProposalComments(proposalId)
if (!isVisible) return null

return (
<div className="FloatingBar">
<div className={classNames('FloatingBar', isVisible && 'FloatingBar--visible')}>
<div className="FloatingBar__ProposalSectionActions">
{showViewReactions && (
<Link onClick={scrollToReactions} className={'FloatingBar__Action'}>
{t('component.floating_bar.view_reactions_label')}
<Reactions />
<img src={reactions} className="FloatingBar__ReactionsImg" />
</Link>
)}
<Link onClick={scrollToComments} className={'FloatingBar__Action'}>
Expand Down
42 changes: 0 additions & 42 deletions src/components/Icon/Reactions.tsx

This file was deleted.

Binary file added src/images/reactions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 729750f

Please sign in to comment.