PlatformWidget
Interfaces
PlatformWidgetProps
Extends
VirtualScrollerItemProps
Indexable
[p
: string
]: any
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
autoHide? | boolean | Hides this component Default false | - |
className? | string | Overrides or extends the styles applied to the component. Default null | - |
endActions? | PlatformWidgetActionType [] | Actions to be inserted after | - |
hideConsoleAction? | boolean | - | - |
hideContactUsAction? | boolean | - | - |
hideHubAction? | boolean | Hide actions | - |
hideModerationAction? | boolean | - | - |
onHeightChange? | () => void | Must be called whenever a list item's height changes (for example, when a user clicks an "Expand"/"Collapse" button of a list item): it re-measures the item's height and updates VirtualScroller layout. Every change in an item's height must come as a result of changing some kind of a state, be it the item's state in VirtualScroller via .onItemStateChange(), or some other state managed by the application. Call this method to re-measure the current element. | VirtualScrollerItemProps.onHeightChange |
onStateChange? | (state : any ) => void | Save current state and when the component re-mount restore previous state using props. It is used to keep a copy of VirtualScroller state so that it could be quickly restored in case the VirtualScroller component gets unmounted and then re-mounted back again — for example, when the user navigates away by clicking on a list item and then navigates "Back" to the list. | VirtualScrollerItemProps.onStateChange |
startActions? | PlatformWidgetActionType [] | Actions to be inserted before | - |
title? | ReactNode | Overrides or extends the styles applied to the component. Default null | - |
Functions
PlatformWidget()
PlatformWidget(
inProps
):JSX.Element
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 demo component here
Import
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. |
Parameters
Parameter | Type | Description |
---|---|---|
inProps | PlatformWidgetProps |
Returns
JSX.Element
Source
packages/react-ui/src/components/PlatformWidget/PlatformWidget.tsx:214
PlatformWidgetSkeleton()
PlatformWidgetSkeleton(
props
):JSX.Element
API documentation for the Community-JS Platform Skeleton component. Learn about the available props and the CSS API.
Import
import {PlatformWidgetSkeleton} from '@selfcommunity/react-ui';
Component Name
The name SCPlatformWidget-skeleton-root
can be used when providing style overrides in the theme.
CSS
Rule Name | Global class | Description |
---|---|---|
root | .SCPlatformWidget-skeleton-root | Styles applied to the root element. |
Parameters
Parameter | Type |
---|---|
props | any |
Returns
JSX.Element
Source
packages/react-ui/src/components/PlatformWidget/Skeleton.tsx:41