New page structure (#1377)
* - new page structure * - removed unecessary task changes * - handleClick -> onClick
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
import { IconButton } from '@/ui/button/components/IconButton';
|
||||
import { IconHeart } from '@/ui/icon';
|
||||
|
||||
type OwnProps = {
|
||||
isFavorite: boolean;
|
||||
onClick: () => void;
|
||||
};
|
||||
|
||||
export function PageFavoriteButton({ isFavorite, onClick }: OwnProps) {
|
||||
return (
|
||||
<IconButton
|
||||
icon={<IconHeart size={16} />}
|
||||
size="medium"
|
||||
variant="secondary"
|
||||
data-testid="add-button"
|
||||
accent={isFavorite ? 'danger' : 'default'}
|
||||
onClick={onClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user