Skip to content

Commit

Permalink
feat: Card를 클릭할 때 배경색 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeml06 committed Aug 19, 2024
1 parent 40ec900 commit 49e2f86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { theme } from '@_common/theme/theme.style';
import { css, Theme } from '@emotion/react';

export const CardBox = css`
export const CardBox = (props: { theme: Theme }) => css`
display: flex;
gap: 1rem;
align-items: center;
width: 100%;
border-radius: 1rem;
&:active {
background-color: ${props.theme.colorPalette.grey[100]};
}
`;

export const TextInfoBox = css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function NotificationCard(props: NotificationCardProps) {
const theme = useTheme();
const typeColor = notificationTypeColors(theme)[notification.type];
return (
<div css={S.CardBox}>
<div css={S.CardBox({ theme })}>
<div css={S.colorDot({ theme, typeColor })}>{'·'}</div>
<div css={S.TextInfoBox}>
<div css={S.Title({ theme })}>{notification.message}</div>
Expand Down

0 comments on commit 49e2f86

Please sign in to comment.