mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 04:53:43 +02:00
Shrink chapter vote buttons
This commit is contained in:
parent
2369fcc92d
commit
7bbf2f1ce2
1 changed files with 7 additions and 4 deletions
|
@ -12,11 +12,13 @@ import { Tooltip } from "../render/Tooltip";
|
|||
|
||||
export interface ChapterVoteProps {
|
||||
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>;
|
||||
size?: string;
|
||||
}
|
||||
|
||||
export interface ChapterVoteState {
|
||||
segment?: SponsorTime;
|
||||
show: boolean;
|
||||
size: string;
|
||||
}
|
||||
|
||||
class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVoteState> {
|
||||
|
@ -27,7 +29,8 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
|
|||
|
||||
this.state = {
|
||||
segment: null,
|
||||
show: false
|
||||
show: false,
|
||||
size: props.size ?? "22px"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -47,7 +50,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
|
|||
onClick={(e) => this.vote(e, 1)}>
|
||||
<ThumbsUpSvg className="playerButtonImage"
|
||||
fill={Config.config.colorPalette.white}
|
||||
width={null} height={null} />
|
||||
width={this.state.size} height={this.state.size} />
|
||||
</button>
|
||||
|
||||
{/* Downvote Button */}
|
||||
|
@ -97,8 +100,8 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
|
|||
<ThumbsDownSvg
|
||||
className="playerButtonImage"
|
||||
fill={downvoteButtonColor(this.state.segment ? [this.state.segment] : null, SkipNoticeAction.Downvote, SkipNoticeAction.Downvote)}
|
||||
width={null}
|
||||
height={null} />
|
||||
width={this.state.size}
|
||||
height={this.state.size} />
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue