Skip to content

Commit 3234d49

Browse files
committed
Move css into a style
1 parent 121005c commit 3234d49

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

site/src/pages/WorkspacePage/WorkspaceNotifications.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,21 +288,12 @@ const NotificationPill: FC<NotificationPillProps> = (props) => {
288288

289289
const NotificationItem: FC<{ notification: Notification }> = (props) => {
290290
const { notification } = props;
291-
const theme = useTheme();
292291

293292
return (
294293
<article css={{ padding: 16 }}>
295294
<h4 css={{ margin: 0, fontWeight: 500 }}>{notification.title}</h4>
296295
{notification.detail && (
297-
<p
298-
css={{
299-
margin: 0,
300-
color: theme.palette.text.secondary,
301-
lineHeight: 1.6,
302-
}}
303-
>
304-
{notification.detail}
305-
</p>
296+
<p css={styles.notificationDetail}>{notification.detail}</p>
306297
)}
307298
<div css={{ marginTop: 8 }}>{notification.actions}</div>
308299
</article>
@@ -339,4 +330,9 @@ const styles = {
339330
pillContainer: {
340331
paddingTop: 8,
341332
},
333+
notificationDetail: (theme) => ({
334+
margin: 0,
335+
color: theme.palette.text.secondary,
336+
lineHeight: 1.6,
337+
}),
342338
} satisfies Record<string, Interpolation<Theme>>;

0 commit comments

Comments
 (0)