|
|
|
@ -1,17 +1,23 @@
|
|
|
|
|
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline';
|
|
|
|
|
import type { ButtonSize } from '@tih/ui';
|
|
|
|
|
import { Button } from '@tih/ui';
|
|
|
|
|
|
|
|
|
|
export type VotingButtonsProps = {
|
|
|
|
|
size?: ButtonSize;
|
|
|
|
|
upvoteCount: number;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function VotingButtons({ upvoteCount }: VotingButtonsProps) {
|
|
|
|
|
export default function VotingButtons({
|
|
|
|
|
upvoteCount,
|
|
|
|
|
size = 'md',
|
|
|
|
|
}: VotingButtonsProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col items-center">
|
|
|
|
|
<Button
|
|
|
|
|
icon={ChevronUpIcon}
|
|
|
|
|
isLabelHidden={true}
|
|
|
|
|
label="Upvote"
|
|
|
|
|
size={size}
|
|
|
|
|
variant="tertiary"
|
|
|
|
|
/>
|
|
|
|
|
<p>{upvoteCount}</p>
|
|
|
|
@ -19,6 +25,7 @@ export default function VotingButtons({ upvoteCount }: VotingButtonsProps) {
|
|
|
|
|
icon={ChevronDownIcon}
|
|
|
|
|
isLabelHidden={true}
|
|
|
|
|
label="Downvote"
|
|
|
|
|
size={size}
|
|
|
|
|
variant="tertiary"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|