Skip to content

Commit

Permalink
ViewportActionCorner customization
Browse files Browse the repository at this point in the history
  • Loading branch information
Devu-trenser authored and abhijith-trenser committed Jan 24, 2025
1 parent 3885024 commit 79b8f42
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import classNames from 'classnames';
import React from 'react';
import { ViewportActionCornersComponentInfo } from '../../types/ViewportActionCornersTypes';
import CustomizableRenderComponent from '../../utils/CustomizableRenderComponent';

export enum ViewportActionCornersLocations {
topLeft,
Expand Down Expand Up @@ -45,6 +46,14 @@ const classes = {
* rendered from left to right in the order that they appear in the array.
*/
function ViewportActionCorners({ cornerComponents }: ViewportActionCornersProps) {
return CustomizableRenderComponent({
customizationId: 'ui.ViewportActionCorner',
FallbackComponent: FallbackViewportActionCorners,
cornerComponents,
});
}

function FallbackViewportActionCorners({ cornerComponents }: ViewportActionCornersProps) {
if (!cornerComponents) {
return null;
}
Expand Down

0 comments on commit 79b8f42

Please sign in to comment.