-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve notification list styles
- Loading branch information
Showing
9 changed files
with
152 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.Notifications__Button { | ||
background: none; | ||
border: none; | ||
padding: 0; | ||
margin: 0; | ||
transition: filter 0.2s ease; | ||
cursor: pointer; | ||
} | ||
|
||
.Notifications__Button--active { | ||
filter: drop-shadow(0 1px 8px var(--alpha-black-300)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useState } from 'react' | ||
|
||
import classNames from 'classnames' | ||
|
||
import useFormatMessage from '../../hooks/useFormatMessage' | ||
import NotificationBellActive from '../Icon/NotificationBellActive' | ||
import NotificationBellInactive from '../Icon/NotificationBellInactive' | ||
|
||
import './Notifications.css' | ||
import NotificationsFeed from './NotificationsFeed' | ||
|
||
export default function Notifications() { | ||
const t = useFormatMessage() | ||
const [isOpen, setOpen] = useState(false) | ||
|
||
return ( | ||
<> | ||
<button | ||
className={classNames('Notifications__Button', isOpen && 'Notifications__Button--active')} | ||
onClick={() => setOpen((prev) => !prev)} | ||
aria-label={t('navigation.notifications.button_label')} | ||
> | ||
{isOpen ? <NotificationBellActive /> : <NotificationBellInactive />} | ||
</button> | ||
<NotificationsFeed isOpen={isOpen} onClose={() => setOpen(false)} /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters