@selfcommunity/react-ui
Version: 
React UI Components to integrate a Community created with SelfCommunity Platform.
50 lines (42 loc) • 1.67 kB
TypeScript
import { LoadingButtonProps } from '@mui/lab';
import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
export interface VoteAudienceButtonProps extends Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, 'onClick' | 'disabled' | 'loading'>> {
    /**
     * Id of the contribution object to vote
     * @default null
     */
    contributionId: number;
    /**
     * Type of the contribution object to vote
     * @default null
     */
    contributionType: SCContributionType;
    /**
     * Contribution object to vote
     * @default null
     */
    contribution?: SCFeedObjectType | SCCommentType | null;
    /**
     * Others properties
     */
    [p: string]: any;
}
/**
 * > API documentation for the Community-JS Vote Audience Button component. Learn about the available props and the CSS API.
 #### Import
 ```jsx
 import {VoteAudienceButton} from '@selfcommunity/react-ui';
 ```
 #### Component Name
 The name `SCVoteAudienceButton` can be used when providing style overrides in the theme.
 #### CSS
 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCVoteAudienceButton-root|Styles applied to the root element.|
 |reactionList|.SCVoteAudienceButton-reactions|Styles applied to the reactionList list element.|
 |dialogRoot|.SCVoteAudienceButton-dialog-root|Styles applied to the dialog root element.|
 |dialogTabs|.SCVoteAudienceButton-dialog-tabs|Styles applied to the tabs element.|
 |dialogVoteBadge|.SCVoteAudienceButton-dialog-vote-badge|Styles applied to the vote badge element.|
 * @param inProps
 */
export default function VoteAudienceButton(inProps: VoteAudienceButtonProps): JSX.Element;