UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

83 lines (74 loc) 3.34 kB
import React from 'react'; import { PlatformWidgetActionType } from '../../types/platformWidget'; import { VirtualScrollerItemProps } from '../../types/virtualScroller'; export interface PlatformWidgetProps extends VirtualScrollerItemProps { /** * Hides this component * @default false */ autoHide?: boolean; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Overrides or extends the styles applied to the component. * @default null */ title?: React.ReactNode | null; /** * Actions to be inserted before */ startActions?: PlatformWidgetActionType[]; /** * Actions to be inserted after */ endActions?: PlatformWidgetActionType[]; /** * Hide actions */ hideHubAction?: boolean; hideConsoleAction?: boolean; hideModerationAction?: boolean; hideContactUsAction?: boolean; /** * Other props */ [p: string]: any; } /** * > API documentation for the Community-JS PlatformWidget component. Learn about the available props and the CSS API. * * * This component renders a widget containing the links that allow users and moderators to handle their application content. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Platform) #### Import ```jsx import {PlatformWidget} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCPlatformWidget` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCPlatformWidget-root|Styles applied to the root element.| |title|.SCPlatformWidget-title|Styles applied to the title element.| |actions|.SCPlatformWidget-actions|Styles applied to the actions container.| |action|.SCPlatformWidget-action|Styles applied to the single action element.| |actionHighlighted|.SCPlatformWidget-action-highlighted|Styles applied to the action highlighted.| |tutorial|.SCPlatformWidget-tutorial|Styles applied to the tutorial element.| |tutorialContent|.SCPlatformWidget-tutorial-content|Styles applied to the content of the tutorial element.| |tutorialTitle|.SCPlatformWidget-tutorial-title|Styles applied to the title element of the tutorial.| |tutorialTitleClose|.SCPlatformWidget-tutorial-title-close|Styles applied to the close button of the title in the tutorial.| |tutorialDesc|.SCPlatformWidget-tutorial-desc|Styles applied to the tutorial description element.| |tutorialOpen|.SCPlatformWidget-tutorial-open|Styles applied to the tutorial element when is active.| |divider|.SCPlatformWidget-divider|Styles applied to the divider element in the tutorial container.| |tutorialControls|.SCPlatformWidget-tutorial-controls|Styles applied to the tutorial bottom controls.| |btnStep|.SCPlatformWidget-btn-step|Styles applied to the button next/previous/skip/close of the tutorial controls.| |btnPreviousStep|.SCPlatformWidget-btn-previous-step|Styles applied to the button previous element of the tutorial controls.| |btnNextStep|.SCPlatformWidget-btn-next-step|Styles applied to the button next element of the tutorial controls.| * * @param inProps */ export default function PlatformWidget(inProps: PlatformWidgetProps): JSX.Element;