@selfcommunity/react-templates 0.3.50-events.58 → 0.3.50-events.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
1
|
+
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType, EventHeaderProps } from '@selfcommunity/react-ui';
|
|
2
2
|
import { SCEventType } from '@selfcommunity/types';
|
|
3
3
|
import { EventFeedProps } from '../EventFeed';
|
|
4
4
|
export interface EventProps {
|
|
@@ -42,6 +42,11 @@ export interface EventProps {
|
|
|
42
42
|
* @default {}
|
|
43
43
|
*/
|
|
44
44
|
EventFeedProps?: EventFeedProps;
|
|
45
|
+
/**
|
|
46
|
+
* Props to spread EventHeader component
|
|
47
|
+
* @default {}
|
|
48
|
+
*/
|
|
49
|
+
EventHeaderProps?: EventHeaderProps;
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
47
52
|
* > API documentation for the Community-JS Category Template. Learn about the available props and the CSS API.
|
|
@@ -51,12 +51,12 @@ function Event(inProps) {
|
|
|
51
51
|
props: inProps,
|
|
52
52
|
name: constants_1.PREFIX
|
|
53
53
|
});
|
|
54
|
-
const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {} } = props;
|
|
54
|
+
const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {}, EventHeaderProps = {} } = props;
|
|
55
55
|
// HOOKS
|
|
56
56
|
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
|
|
57
57
|
if (!scEvent) {
|
|
58
58
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
59
59
|
}
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.EventHeader, { event: scEvent }), (0, jsx_runtime_1.jsx)(EventFeed_1.default, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.EventHeader, Object.assign({ event: scEvent }, EventHeaderProps)), (0, jsx_runtime_1.jsx)(EventFeed_1.default, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
|
|
61
61
|
}
|
|
62
62
|
exports.default = Event;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
|
|
1
|
+
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType, EventHeaderProps } from '@selfcommunity/react-ui';
|
|
2
2
|
import { SCEventType } from '@selfcommunity/types';
|
|
3
3
|
import { EventFeedProps } from '../EventFeed';
|
|
4
4
|
export interface EventProps {
|
|
@@ -42,6 +42,11 @@ export interface EventProps {
|
|
|
42
42
|
* @default {}
|
|
43
43
|
*/
|
|
44
44
|
EventFeedProps?: EventFeedProps;
|
|
45
|
+
/**
|
|
46
|
+
* Props to spread EventHeader component
|
|
47
|
+
* @default {}
|
|
48
|
+
*/
|
|
49
|
+
EventHeaderProps?: EventHeaderProps;
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
47
52
|
* > API documentation for the Community-JS Category Template. Learn about the available props and the CSS API.
|
|
@@ -48,11 +48,11 @@ export default function Event(inProps) {
|
|
|
48
48
|
props: inProps,
|
|
49
49
|
name: PREFIX
|
|
50
50
|
});
|
|
51
|
-
const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {} } = props;
|
|
51
|
+
const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {}, EventHeaderProps = {} } = props;
|
|
52
52
|
// HOOKS
|
|
53
53
|
const { scEvent } = useSCFetchEvent({ id: eventId, event });
|
|
54
54
|
if (!scEvent) {
|
|
55
55
|
return _jsx(EventSkeletonTemplate, {});
|
|
56
56
|
}
|
|
57
|
-
return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(EventHeader, { event: scEvent }), _jsx(EventFeed, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
|
|
57
|
+
return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(EventHeader, Object.assign({ event: scEvent }, EventHeaderProps)), _jsx(EventFeed, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
|
|
58
58
|
}
|