Skip to content

Commit

Permalink
feat(fuselage-ui-kit): export SurfaceRender to allow custom surfaces (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Nov 11, 2024
1 parent b27ecdf commit 3bd70ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/fuselage-ui-kit/src/contexts/SurfaceContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type SurfaceContextValue =
| 'banner'
| 'message'
| 'modal'
| 'contextualBar';
| 'contextualBar'
| 'custom';

export const SurfaceContext = createContext<SurfaceContextValue>('message');
12 changes: 12 additions & 0 deletions packages/fuselage-ui-kit/src/surfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ import { BannerSurfaceRenderer } from './BannerSurfaceRenderer';
import ContextualBarSurface from './ContextualBarSurface';
import { ContextualBarSurfaceRenderer } from './ContextualBarSurfaceRenderer';
import { FuselageMessageSurfaceRenderer } from './FuselageMessageSurfaceRenderer';
import {
FuselageSurfaceRenderer,
renderTextObject,
} from './FuselageSurfaceRenderer';
import MessageSurface from './MessageSurface';
import ModalSurface from './ModalSurface';
import { ModalSurfaceRenderer } from './ModalSurfaceRenderer';
import { Surface } from './Surface';
import { createSurfaceRenderer } from './createSurfaceRenderer';

export const bannerParser = new BannerSurfaceRenderer();
Expand All @@ -23,3 +28,10 @@ export const UiKitContextualBar = createSurfaceRenderer(
ContextualBarSurface,
contextualBarParser,
);

export {
createSurfaceRenderer,
Surface,
FuselageSurfaceRenderer,
renderTextObject,
};

0 comments on commit 3bd70ee

Please sign in to comment.