-
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: add empty state, pagination and more styles
- Loading branch information
Showing
6 changed files
with
117 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function PeaceCircle() { | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width="124" height="124" fill="none" viewBox="0 0 124 124"> | ||
<rect width="124" height="124" fill="#F3F2F5" rx="62"></rect> | ||
<path | ||
fill="#736E7D" | ||
d="M58 30c2.212 0 4 1.788 4 4v26h-8V34c0-2.212 1.787-4 4-4zm12 20c2.212 0 4 1.788 4 4v8c0 2.213-1.788 4-4 4-2.213 0-4-1.787-4-4v-8c0-2.212 1.787-4 4-4zm8 8c0-2.212 1.787-4 4-4 2.212 0 4 1.788 4 4v8c0 2.213-1.788 4-4 4-2.213 0-4-1.787-4-4v-8zM41.662 36.4L51.987 60h-8.725l-8.925-20.4a3.992 3.992 0 012.063-5.263 3.988 3.988 0 015.262 2.063zm3.375 27.663L45.012 64H57c2.762 0 5 2.237 5 5s-2.238 5-5 5h-7c-1.1 0-2 .9-2 2s.9 2 2 2h7c4.975 0 9-4.025 9-9v-.075A8.005 8.005 0 0070 70c1.65 0 3.175-.5 4.45-1.35A8.003 8.003 0 0082 74a7.879 7.879 0 004-1.075V74c0 11.05-8.95 20-20 20h-7.713c-5.3 0-10.387-2.112-14.137-5.862l-1.45-1.45A15.97 15.97 0 0138 75.374V72c0-4.088 3.075-7.463 7.037-7.938z" | ||
></path> | ||
</svg> | ||
) | ||
} | ||
|
||
export default PeaceCircle |
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,11 @@ | ||
.NotificationItem { | ||
padding: 0 16px; | ||
} | ||
|
||
.NotificationItem__Text { | ||
margin-bottom: 0; | ||
} | ||
|
||
.NotificationItem__Date { | ||
text-transform: uppercase; | ||
} |
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,26 @@ | ||
import Time from '../../utils/date/Time' | ||
import type { Notification } from '../../utils/notifications' | ||
import Link from '../Common/Typography/Link' | ||
import Text from '../Common/Typography/Text' | ||
|
||
import './NotificationItem.css' | ||
|
||
interface Props { | ||
notification: Notification | ||
} | ||
|
||
export default function NotificationItem({ notification }: Props) { | ||
const hasLink = !!notification.payload.data.acta | ||
const Component = hasLink ? Link : 'div' | ||
|
||
return ( | ||
<Component className="NotificationItem" href={notification.payload.data.acta}> | ||
<Text className="NotificationItem__Text" size="sm"> | ||
{notification.payload.data.amsg} | ||
</Text> | ||
<Text className="NotificationItem__Date" color="secondary" size="xs"> | ||
{Time(notification.epoch).fromNow()} | ||
</Text> | ||
</Component> | ||
) | ||
} |
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