Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update(ModalInner): refactor with hooks #407

Merged
merged 3 commits into from
Oct 28, 2020

Conversation

moyus
Copy link
Collaborator

@moyus moyus commented Oct 27, 2020

to: @williaster @alecklandgraf

Description

Refactor ModalInner component into functional component with hooks.

Motivation and Context

Currently, the innerStyleSheet prop of Modal is not working, because ModalInner not support customized stylesheet. In order to support it, we need to refactor ModalInner component into functional component with hooks.

Testing

  • All unit test case passed
  • Manually test Modal component in storybook and all work fine

Screenshots

There is no UI change.

Screen Shot 2020-10-27 at 3 43 10 PM

Checklist

  • My code follows the style guide of this project.
  • I have updated or added documentation accordingly.
  • I have read the CONTRIBUTING document.

@airbnb-bot
Copy link
Collaborator

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
core -0.1% 566.86 KB 567.33 KB 709.87 KB 709.46 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 580945,
    "lib": 726482
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}

Current

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 580467,
    "lib": 726903
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🙏

@moyus moyus merged commit 34e5a3f into master Oct 28, 2020
@moyus moyus deleted the refactor-modal-inner-with-hooks branch October 28, 2020 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants