Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/giant-lies-help.md

This file was deleted.

22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# @wethegit/react-modal

## 2.0.0

### Major Changes

- [#7](https://github.com/wethegit/react-modal/pull/7) [`4512c52`](https://github.com/wethegit/react-modal/commit/4512c52e7c2baca133fa03e33762639a04b46938) Thanks [@marlonmarcello](https://github.com/marlonmarcello)! - # V2

## Breaking changes

Seriously, everything.

## Why

The old design of the modal was good but it had an achilles heel, it used an internal context to handle the transition and syncing that with the state which caused:

1. Actions to be tied to a context, adding custom components to close the modal for example was a bit annoying
2. Animation and state were too tightly coupled and not exposed for further customization

## What's new

The modal is now a controlled component, you can control the state of the modal from outside using the hook `useModal` which also exposes the state so you can use further customize the Modal and even the child components.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wethegit/react-modal",
"version": "1.0.2",
"version": "2.0.0",
"description": "A customizable, accessible modal window component for React projects.",
"files": [
"dist"
Expand Down