@reusable-ui/modal
Version:
Overlays a dialog to the entire site's page.
21 lines (15 loc) • 548 B
text/typescript
// defaults:
const _defaultBackdropStyle : BackdropStyle = 'regular'
// hooks:
// variants:
//#region BackdropVariant
export type BackdropStyle = 'regular'|'hidden'|'interactive'|'static' // might be added more styles in the future
export interface BackdropVariant {
backdropStyle ?: BackdropStyle
}
export const useBackdropVariant = ({backdropStyle = _defaultBackdropStyle}: BackdropVariant) => {
return {
class: (backdropStyle === 'regular') ? null : backdropStyle,
};
};
//#endregion BackdropVariant