UNPKG

@selfcommunity/react-ui

Version:

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

62 lines (57 loc) 1.89 kB
import { SCCustomAdvPosition } from '@selfcommunity/types'; import { VirtualScrollerItemProps } from '../../types/virtualScroller'; export interface CustomAdvProps extends VirtualScrollerItemProps { /** * Id of the feed object * @default 'custom_adv' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Advertising id */ advId?: number; /** * Position of the ADV */ position?: SCCustomAdvPosition; /** * Category ids if the adv must be related to specific categories */ categoriesId?: Array<number> | null; /** * Group ids if the adv must be related to specific groups */ groupsId?: Array<number> | null; /** * Prefixed height. Usefull to re-mount item on scroll feed. */ prefixedHeight?: number; } /** * > API documentation for the Community-JS CustomAdv component. Learn about the available props and the CSS API. * * * This component renders custom adv banners. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/CustomAdv) #### Import ```jsx import {CustomAdv} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCCustomAdv` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCCustomAdv-root|Styles applied to the root element.| |wrap|.SCCustomAdv-wrap|Styles applied to wrap an element.| |image|.SCCustomAdv-image|Styles applied to the image element.| |embedCode|.SCCustomAdv-embed-code|Styles applied to the embed code section.| |prefixedHeight|.SCCustomAdv-prefixed-height|Styles applied to handle a prefixed height.| * @param inProps */ export default function CustomAdv(inProps: CustomAdvProps): JSX.Element;