Skip to main content

VoteButton

Interfaces

VoteButtonProps

Extends

  • Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, "onClick" | "disabled" | "loading">>

Indexable

[p: string]: any

Others properties

Properties

PropertyTypeDescription
contribution?SCCommentType | SCFeedObjectTypeContribution object to vote Default null
contributionIdnumberId of the contribution object to vote Default null
contributionTypeSCContributionTypeType of the contribution object to vote Default null
onVote?(contribution) => anyonVote callback Default null

Functions

VoteButton()

VoteButton(inProps): Element

API documentation for the Community-JS Vote Button component. Learn about the available props and the CSS API.

Import

import {VoteAudienceButton} from '@selfcommunity/react-ui';

Component Name

The name SCVoteButton can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCVoteButton-rootStyles applied to the root element.
voted.SCVoteButton-votedStyles applied to the root element when the user has vote the contribution.

Parameters

ParameterTypeDescription
inPropsVoteButtonProps

Returns

Element