UNPKG

@selfcommunity/react-ui

Version:

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

69 lines (60 loc) 2.18 kB
import { UserProps } from '../User'; import { WidgetProps } from '../Widget'; import { VirtualScrollerItemProps } from '../../types/virtualScroller'; import { CacheStrategies } from '@selfcommunity/utils'; import { BaseDialogProps } from '../../shared/BaseDialog'; export interface UserSuggestionWidgetProps extends VirtualScrollerItemProps, WidgetProps { /** * Hides this component * @default false */ autoHide?: boolean; /** * Limit the number of categories to show * @default false */ limit?: number; /** * Props to spread to single user object * @default empty object */ UserProps?: UserProps; /** * Caching strategies * @default CacheStrategies.CACHE_FIRST */ cacheStrategy?: CacheStrategies; /** * Props to spread to users suggestion dialog * @default {} */ DialogProps?: BaseDialogProps; /** * Other props */ [p: string]: any; } /** * > API documentation for the Community-JS User Suggestion Widget component. Learn about the available props and the CSS API. * * * This component renders a list of suggested users. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserSuggestion) #### Import ```jsx import {UserSuggestionWidget} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCUserSuggestionWidget` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCUserSuggestionWidget-root|Styles applied to the root element.| |title|.SCUserSuggestionWidget-title|Styles applied to the title element.| |noResults|.SCUserSuggestionWidget-no-results|Styles applied to no results section.| |showMore|.SCUserSuggestionWidget-show-more|Styles applied to show more button element.| |dialogRoot|.SCUserSuggestionWidget-dialog-root|Styles applied to the root dialog element.| |endMessage|.SCUserSuggestionWidget-end-message|Styles applied to the end message element.| * @param inProps */ export default function UserSuggestionWidget(inProps: UserSuggestionWidgetProps): JSX.Element;