rating-cosmetics

This commit is contained in:
Untone 2024-01-23 05:18:17 +03:00
parent a9d9108463
commit 5b7d8a1658

View File

@ -73,12 +73,9 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
return ( return (
<div class={clsx(styles.rating, props.class)}> <div class={clsx(styles.rating, props.class)}>
<button onClick={() => handleRatingChange(false)} disabled={isLoading()}> <button onClick={() => handleRatingChange(false)} disabled={isLoading()}>
<Show when={!isDownvoted()}> <Show when={!isDownvoted()} fallback={<Icon name="rating-control-checked" />}>
<Icon name="rating-control-less" /> <Icon name="rating-control-less" />
</Show> </Show>
<Show when={isDownvoted()}>
<Icon name="rating-control-checked" />
</Show>
</button> </button>
<Popup trigger={<span class={styles.ratingValue}>{props.shout.stat.rating}</span>} variant="tiny"> <Popup trigger={<span class={styles.ratingValue}>{props.shout.stat.rating}</span>} variant="tiny">
@ -89,12 +86,9 @@ export const ShoutRatingControl = (props: ShoutRatingControlProps) => {
</Popup> </Popup>
<button onClick={() => handleRatingChange(true)} disabled={isLoading()}> <button onClick={() => handleRatingChange(true)} disabled={isLoading()}>
<Show when={!isUpvoted()}> <Show when={!isUpvoted()} fallback={<Icon name="rating-control-checked" />}>
<Icon name="rating-control-more" /> <Icon name="rating-control-more" />
</Show> </Show>
<Show when={isUpvoted()}>
<Icon name="rating-control-checked" />
</Show>
</button> </button>
</div> </div>
) )