UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

3 lines (2 loc) 576 B
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../../internal/utils/without.cjs");var i=(e=>(e.DIALOG_CLOSE="DIALOG_CLOSE",e.DIALOG_OPEN="DIALOG_OPEN",e))(i||{});const o={open:[]},c=(e=o,t)=>{switch(t.type){case"DIALOG_CLOSE":{const{id:n}=t,r=O.without(({id:u})=>u!==n,e.open);return{...e,open:r}}case"DIALOG_OPEN":{const{id:n,params:r}=t;return{...e,open:[...e.open,{id:n,params:r}]}}default:return e}};exports.Actions=i;exports.DialogReducer=c;exports.initialState=o; //# sourceMappingURL=DialogReducer.cjs.map