UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

18 lines (14 loc) 481 B
import type { Theme } from '@mui/material' import { defaultMaxHeight } from '../config/constants' import type { WidgetTheme } from '../types/widget' export const getWidgetMaxHeight = ( theme: Theme | WidgetTheme | undefined ): number | string => { if (theme?.container?.maxHeight) { return theme?.container?.maxHeight } if (theme?.container?.height && theme?.container?.height !== 'fit-content') { return theme?.container?.height } return defaultMaxHeight }