@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
108 lines (103 loc) • 3.83 kB
TypeScript
import { GridProps } from '@mui/material';
import { EndpointType } from '@selfcommunity/api-services';
import React from 'react';
import { CreateEventButtonProps } from '../CreateEventButton';
import { EventProps, EventSkeletonProps } from '../Event';
import { EventsSkeletonProps } from '../Events/Skeleton';
export declare const EventsChipRoot: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
ref?: React.Ref<HTMLDivElement>;
}, "avatar" | "className" | "style" | "classes" | "label" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "icon" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
export interface EventsProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Event API Endpoint
* @default Endpoints.SearchEvents
*/
endpoint: EndpointType;
/**
* Feed API Query Params
* @default [{'limit': 20, 'offset': 0}]
*/
endpointQueryParams?: Record<string, string | number>;
/**
* Props to spread to single event object
* @default {}
*/
EventComponentProps?: EventProps;
/**
* Props to spread to events skeleton object
* @default {}
*/
EventsSkeletonComponentProps?: EventsSkeletonProps;
/**
* Props to spread to single event skeleton object
* @default {}
*/
EventSkeletonComponentProps?: EventSkeletonProps;
/**
* Props spread to grid container
* @default {}
*/
GridContainerComponentProps?: Pick<GridProps, Exclude<keyof GridProps, 'container' | 'component' | 'children' | 'item' | 'classes'>>;
/**
* Props spread to single grid item
* @default {}
*/
GridItemComponentProps?: Pick<GridProps, Exclude<keyof GridProps, 'container' | 'component' | 'children' | 'item' | 'classes'>>;
/**
* Props to spread to CreateEvent component
* @default empty object
*/
CreateEventButtonProps?: CreateEventButtonProps;
/**
* Show/Hide filters
* @default true
*/
showFilters?: boolean;
/**
* Hides my events title
* @default false
*/
hideTitle?: boolean;
/**
* Filters component
* @param props
*/
filters?: JSX.Element;
/** If true, it means that the endpoint fetches all events available
* @default true
*/
general?: boolean;
/**
* Other props
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS Events component. Learn about the available props and the CSS API.
*
*
* The Events component renders the list of all available events.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Events)
#### Import
```jsx
import {Events} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCEvents` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCEvents-root|Styles applied to the root element.|
|filters|.SCEvents-filters|Styles applied to the title element.|
|events|.SCEvents-events|Styles applied to the title element.|
|item|.SCEvents-item|Styles applied to the title element.|
|noResults|.SCEvents-no-results|Styles applied to no results section.|
|showMore|.SCEvents-show-more|Styles applied to show more button element.|
* @param inProps
*/
export default function Events(inProps: EventsProps): JSX.Element;