Skip to content

Commit

Permalink
improve the active state of the changelog button
Browse files Browse the repository at this point in the history
  • Loading branch information
medyo committed Nov 12, 2022
1 parent fa0f194 commit 0ed63e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/assets/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,11 @@ Producthunt item
text-transform: lowercase;
background-color: var(--tooltip-accent-color);
}

.changelogNewButton {
display: flex;
flex-direction: row;
align-items: center;
}
.searchBar {
position: relative;
margin: 0 auto;
Expand Down
16 changes: 11 additions & 5 deletions src/features/changelog/components/Changelog.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react'
import ReactTooltip from 'react-tooltip'
import { HiBell } from 'react-icons/hi'
import { HiBell, HiSparkles } from 'react-icons/hi'
import ReactMarkdown from 'react-markdown'
import { format } from 'timeago.js'
import BeatLoader from 'react-spinners/BeatLoader'
import {useGetVersions} from "../api/getVersions";
import {useChangelogStore} from "../stores/changelog";
import {getAppVersion} from "src/utils/Os";
import { useGetVersions } from '../api/getVersions'
import { useChangelogStore } from '../stores/changelog'
import { getAppVersion } from 'src/utils/Os'
import { trackChangeLogOpen } from 'src/lib/analytics'

export const Changelog = () => {
Expand Down Expand Up @@ -82,7 +82,13 @@ export const Changelog = () => {
data-tip
data-for={tooltipId}
className={'changelogButton' + (!isChangelogRead() ? ' active' : '')}>
{isChangelogRead() ? <HiBell style={{ width: 14 }} /> : `New`}
{isChangelogRead() ? (
<HiBell style={{ width: 14 }} />
) : (
<div className="changelogNewButton">
<HiSparkles style={{ width: 14 }} /> New
</div>
)}
</span>
</>
)
Expand Down

0 comments on commit 0ed63e1

Please sign in to comment.