[questions][ui] voting button size

pull/346/head
wlren 3 years ago
parent 9c6719df87
commit d7cc7d3ff9

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

Loading…
Cancel
Save