mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 00:51:17 -08:00
Fix notification row actions being spread across the row
This commit is contained in:
1 parent
d724838a3d
commit
2c3b245050
1 file changed
+7
-13
@@ -1,6 +1,6 @@
|
||||
import type { MouseEventHandler } from 'react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Avatar, Box, Chip, Header, IconButton, Scroll, Text, config, toRem } from 'folds';
|
||||
import { Avatar, Badge, Box, Chip, Header, IconButton, Scroll, Text, config, toRem } from 'folds';
|
||||
import {
|
||||
ArrowLeft,
|
||||
CaretUp,
|
||||
@@ -97,18 +97,12 @@ function NotificationItem({
|
||||
event={event}
|
||||
renderContent={renderContent}
|
||||
actions={
|
||||
<>
|
||||
// One element: MessagePreview drops this straight into a
|
||||
// justifyContent="SpaceBetween" row, so separate children get spread
|
||||
// across its full width instead of grouping on the right.
|
||||
<Box shrink="No" gap="200" alignItems="Center">
|
||||
{!isRead && (
|
||||
<Box
|
||||
style={{
|
||||
width: '8px',
|
||||
height: '8px',
|
||||
borderRadius: '50%',
|
||||
background: 'currentColor',
|
||||
flexShrink: 0,
|
||||
}}
|
||||
aria-label="Unread"
|
||||
/>
|
||||
<Badge variant="Secondary" size="200" fill="Solid" radii="Pill" outlined={false} />
|
||||
)}
|
||||
<Chip onClick={handleOpen} variant="Secondary" radii="400">
|
||||
<Text size="T200">Open</Text>
|
||||
@@ -116,7 +110,7 @@ function NotificationItem({
|
||||
<Chip onClick={handleDismiss} variant="Surface" radii="400">
|
||||
<Text size="T200">Done</Text>
|
||||
</Chip>
|
||||
</>
|
||||
</Box>
|
||||
}
|
||||
onOpen={handleOpen}
|
||||
hour24Clock={hour24Clock}
|
||||
|
||||
Reference in new issue
Block a user