Skip to content

Commit

Permalink
Merge pull request #242 from FrameMuse/227-remove-deprecated
Browse files Browse the repository at this point in the history
Remove deprecated
  • Loading branch information
FrameMuse authored Dec 10, 2023
2 parents 5d526b2 + 03626e4 commit c65ae4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
5 changes: 1 addition & 4 deletions src/ModalWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ const DEFAULT_PARAMS: ModalParams = {
closable: true,
keepMounted: false,
layer: 0,
label: "Content is unknown. Bad guy didn't set a label.",

weak: false,
fork: false
label: "Content is unknown. Bad guy didn't set a label."
}

class ModalWindow<CustomParams = unknown> {
Expand Down
23 changes: 3 additions & 20 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,16 @@ export interface ModalParams {
id: string | number
/**
* Whether to enable built-in closing mechanisms.
*
*
* - `ESC` key
* - `click` on the overlay
*
* @default true
*/
closable: boolean
/**
* Use `id` parameter with unique value instead.
* @example
* Modal.open(Component, { id: 1 })
* @example
* Modal.open(Component, { id: 2 })
* @example
* Modal.open(Component, { id: Date.now() })
*
* @deprecated
*/
weak: boolean
/**
* Use `layer` instead.
* @deprecated
*/
fork: boolean
/**
* Forks the modal window to a new layer.
*
*
* @default 0
*/
layer: number
Expand Down Expand Up @@ -110,7 +93,7 @@ export type ModalWindowParams<P = unknown> =

/**
* This is intented to fix errors related to passing `ModalWindowParams` to spreaded array of `ModalWindowParams`.
*
*
* Removes `undefined` from `ModalWindowParams`, otherwise it will show `"'P' could be instantiated with an arbitrary type..."` error.
* Even though it's ok to pass `undefined` and arbitrary type there.
*/
Expand Down

0 comments on commit c65ae4d

Please sign in to comment.