mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-11 00:33:04 +00:00
feat: add theme manager
awesome!
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { MouseEventHandler } from 'react';
|
||||
import { AiFillStar, AiOutlineStar } from 'react-icons/ai';
|
||||
import ActionStyle from '~/components/dashboard/quick_action/_quick_action_style';
|
||||
import { theme } from '~/styles/theme';
|
||||
|
||||
const StartIcon = styled(AiFillStar)(({ theme }) => ({
|
||||
color: theme.colors.yellow,
|
||||
}));
|
||||
const UnstaredIcon = StartIcon.withComponent(AiOutlineStar);
|
||||
|
||||
const QuickLinkFavoriteStyle = ActionStyle.withComponent('div');
|
||||
const QuickLinkFavorite = ({
|
||||
@@ -14,11 +19,7 @@ const QuickLinkFavorite = ({
|
||||
<QuickLinkFavoriteStyle
|
||||
onClick={onClick ? (event) => onClick(event) : undefined}
|
||||
>
|
||||
{isFavorite ? (
|
||||
<AiFillStar color={theme.colors.yellow} />
|
||||
) : (
|
||||
<AiOutlineStar color={theme.colors.yellow} />
|
||||
)}
|
||||
{isFavorite ? <StartIcon /> : <UnstaredIcon />}
|
||||
</QuickLinkFavoriteStyle>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user