Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
fix: allow larger choice of colors for mention Button main color
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Apr 12, 2023
1 parent 53bed7f commit 39c3268
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Mentions/MentionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
import { UseQueryResult } from 'react-query';

import { Notifications } from '@mui/icons-material';
import { Badge, BadgeProps, IconButton } from '@mui/material';
import { Badge, BadgeProps, IconButton, SvgIconProps } from '@mui/material';

import { MentionStatus } from '@graasp/sdk';
import { MemberMentionsRecord, MemberRecord } from '@graasp/sdk/frontend';
Expand All @@ -16,7 +16,7 @@ import MentionsDialog from './MentionsDialog';
import MentionsTable from './MentionsTable';

type Props = {
color?: 'primary' | 'secondary';
color?: SvgIconProps['color'] | string;
badgeColor?: BadgeProps['color'];
useMentions: (
options?: { getUpdates?: boolean | undefined } | undefined,
Expand Down Expand Up @@ -72,7 +72,10 @@ const MentionButton: FC<Props> = ({
0
}
>
<Notifications color={color} />
<Notifications
color={typeof color !== 'string' ? color : undefined}
htmlColor={color}
/>
</Badge>
</IconButton>
<MentionsDialog
Expand Down

0 comments on commit 39c3268

Please sign in to comment.