File tree Expand file tree Collapse file tree
src/plugin-slots/PageBannerSlot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import React , { ReactNode } from 'react' ;
2+ import { PluginSlot } from '@openedx/frontend-plugin-framework' ;
3+ import { PageBanner } from '@openedx/paragon' ;
4+
5+ export interface PageBannerSlotProps {
6+ show ?: boolean ;
7+ dismissible ?: boolean ;
8+ onDismiss ?: ( ) => void ;
9+ className ?: string ;
10+ children ?: ReactNode ;
11+ }
12+
13+ const PageBannerSlot : React . FC < PageBannerSlotProps > = ( {
14+ show,
15+ dismissible,
16+ onDismiss,
17+ className,
18+ children,
19+ } ) => (
20+ < PluginSlot
21+ id = "org.openedx.frontend.authoring.page_banner.v1"
22+ idAliases = { [ "page_banner_slot" ] }
23+ pluginProps = { { show, dismissible, onDismiss, className } }
24+ >
25+ < PageBanner
26+ show = { show }
27+ dismissible = { dismissible }
28+ onDismiss = { onDismiss }
29+ className = { className }
30+ >
31+ { children }
32+ </ PageBanner >
33+ </ PluginSlot >
34+ ) ;
35+
36+ export default PageBannerSlot ;
You can’t perform that action at this time.
0 commit comments