{"action":"created","comment":{"url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/comments/171019027","pull_request_review_id":99797853,"id":171019027,"diff_hunk":"@@ -0,0 +1,105 @@\n+import React from 'react'\n+import PropTypes from 'prop-types'\n+import styled from 'styled-components'\n+import {Portal} from 'react-portal'\n+\n+const ModalPosition = styled.div`\n+  position: relative;\n+  z-index: 999;\n+`\n+\n+const KEYCODES = {\n+    ESCAPE: 27\n+}\n+  \n+class Modal extends React.Component {\n+    constructor(props) {\n+        super(props)\n+        this.portalNode = null\n+        this.state = { active: !!props.defaultOpen }\n+        this.openPortal = this.openPortal.bind(this)\n+        this.closePortal = this.closePortal.bind(this)\n+        this.wrapWithPortal = this.wrapWithPortal.bind(this)\n+        this.handleKeydown = this.handleKeydown.bind(this)\n+    }\n+  \n+    componentDidMount() {\n+        if (this.props.closeOnEsc) {\n+            document.addEventListener('keydown', this.handleKeydown)\n+        }\n+    }\n+  \n+    componentWillUnmount() {\n+        if (this.props.closeOnEsc) {\n+            document.removeEventListener('keydown', this.handleKeydown)\n+        }\n+    }\n+  \n+    openPortal(e) {\n+        if (this.state.active) {\n+            return\n+        }\n+        if (e && e.nativeEvent) {\n+            e.nativeEvent.stopImmediatePropagation()\n+        }\n+        this.setState({ active: true }, this.props.onOpen)\n+    }\n+  \n+    closePortal() {\n+        if (!this.state.active) {\n+            return\n+        }\n+        this.setState({ active: false }, this.props.onClose)\n+    }\n+  \n+    wrapWithPortal(children) {\n+        if (!this.state.active) {\n+            return null\n+        }\n+        return (\n+            <Portal\n+              node={this.props.node}\n+              key=\"react-portal\"\n+              ref={(portalNode) => { this.portalNode = portalNode }}\n+            >\n+                {children}\n+            </Portal>\n+        )\n+    }\n+\n+    handleKeydown(e) {\n+        if (e.keyCode === KEYCODES.ESCAPE && this.state.active) {","path":"src/components/layout/Modal.js","position":71,"original_position":71,"commit_id":"0d45aeac256bf86faa06d68b80e98e82e0573a59","original_commit_id":"0d45aeac256bf86faa06d68b80e98e82e0573a59","user":{"login":"arizonatribe","id":9353288,"avatar_url":"https://avatars0.githubusercontent.com/u/9353288?v=4","gravatar_id":"","url":"https://api.github.com/users/arizonatribe","html_url":"https://github.com/arizonatribe","followers_url":"https://api.github.com/users/arizonatribe/followers","following_url":"https://api.github.com/users/arizonatribe/following{/other_user}","gists_url":"https://api.github.com/users/arizonatribe/gists{/gist_id}","starred_url":"https://api.github.com/users/arizonatribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arizonatribe/subscriptions","organizations_url":"https://api.github.com/users/arizonatribe/orgs","repos_url":"https://api.github.com/users/arizonatribe/repos","events_url":"https://api.github.com/users/arizonatribe/events{/privacy}","received_events_url":"https://api.github.com/users/arizonatribe/received_events","type":"User","site_admin":false},"body":"Nice","created_at":"2018-02-27T18:23:01Z","updated_at":"2018-02-27T18:37:54Z","html_url":"https://github.com/Attainia/attainia-web-components/pull/73#discussion_r171019027","pull_request_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/comments/171019027"},"html":{"href":"https://github.com/Attainia/attainia-web-components/pull/73#discussion_r171019027"},"pull_request":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73","id":171516413,"html_url":"https://github.com/Attainia/attainia-web-components/pull/73","diff_url":"https://github.com/Attainia/attainia-web-components/pull/73.diff","patch_url":"https://github.com/Attainia/attainia-web-components/pull/73.patch","issue_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/73","number":73,"state":"open","locked":false,"title":"Feature/modal","user":{"login":"atomboulian","id":5349946,"avatar_url":"https://avatars0.githubusercontent.com/u/5349946?v=4","gravatar_id":"","url":"https://api.github.com/users/atomboulian","html_url":"https://github.com/atomboulian","followers_url":"https://api.github.com/users/atomboulian/followers","following_url":"https://api.github.com/users/atomboulian/following{/other_user}","gists_url":"https://api.github.com/users/atomboulian/gists{/gist_id}","starred_url":"https://api.github.com/users/atomboulian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomboulian/subscriptions","organizations_url":"https://api.github.com/users/atomboulian/orgs","repos_url":"https://api.github.com/users/atomboulian/repos","events_url":"https://api.github.com/users/atomboulian/events{/privacy}","received_events_url":"https://api.github.com/users/atomboulian/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-26T22:57:56Z","updated_at":"2018-02-27T18:37:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f9248d04ea88806fdb2ec9ebf9977627ede24d9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mgonzo","id":1801416,"avatar_url":"https://avatars3.githubusercontent.com/u/1801416?v=4","gravatar_id":"","url":"https://api.github.com/users/mgonzo","html_url":"https://github.com/mgonzo","followers_url":"https://api.github.com/users/mgonzo/followers","following_url":"https://api.github.com/users/mgonzo/following{/other_user}","gists_url":"https://api.github.com/users/mgonzo/gists{/gist_id}","starred_url":"https://api.github.com/users/mgonzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgonzo/subscriptions","organizations_url":"https://api.github.com/users/mgonzo/orgs","repos_url":"https://api.github.com/users/mgonzo/repos","events_url":"https://api.github.com/users/mgonzo/events{/privacy}","received_events_url":"https://api.github.com/users/mgonzo/received_events","type":"User","site_admin":false},{"login":"AlexMaskovyak","id":2085759,"avatar_url":"https://avatars2.githubusercontent.com/u/2085759?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexMaskovyak","html_url":"https://github.com/AlexMaskovyak","followers_url":"https://api.github.com/users/AlexMaskovyak/followers","following_url":"https://api.github.com/users/AlexMaskovyak/following{/other_user}","gists_url":"https://api.github.com/users/AlexMaskovyak/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMaskovyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMaskovyak/subscriptions","organizations_url":"https://api.github.com/users/AlexMaskovyak/orgs","repos_url":"https://api.github.com/users/AlexMaskovyak/repos","events_url":"https://api.github.com/users/AlexMaskovyak/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMaskovyak/received_events","type":"User","site_admin":false},{"login":"TimGraf","id":6503441,"avatar_url":"https://avatars2.githubusercontent.com/u/6503441?v=4","gravatar_id":"","url":"https://api.github.com/users/TimGraf","html_url":"https://github.com/TimGraf","followers_url":"https://api.github.com/users/TimGraf/followers","following_url":"https://api.github.com/users/TimGraf/following{/other_user}","gists_url":"https://api.github.com/users/TimGraf/gists{/gist_id}","starred_url":"https://api.github.com/users/TimGraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimGraf/subscriptions","organizations_url":"https://api.github.com/users/TimGraf/orgs","repos_url":"https://api.github.com/users/TimGraf/repos","events_url":"https://api.github.com/users/TimGraf/events{/privacy}","received_events_url":"https://api.github.com/users/TimGraf/received_events","type":"User","site_admin":false},{"login":"JonoMercier","id":25554622,"avatar_url":"https://avatars1.githubusercontent.com/u/25554622?v=4","gravatar_id":"","url":"https://api.github.com/users/JonoMercier","html_url":"https://github.com/JonoMercier","followers_url":"https://api.github.com/users/JonoMercier/followers","following_url":"https://api.github.com/users/JonoMercier/following{/other_user}","gists_url":"https://api.github.com/users/JonoMercier/gists{/gist_id}","starred_url":"https://api.github.com/users/JonoMercier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonoMercier/subscriptions","organizations_url":"https://api.github.com/users/JonoMercier/orgs","repos_url":"https://api.github.com/users/JonoMercier/repos","events_url":"https://api.github.com/users/JonoMercier/events{/privacy}","received_events_url":"https://api.github.com/users/JonoMercier/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73/commits","review_comments_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73/comments","review_comment_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/73/comments","statuses_url":"https://api.github.com/repos/Attainia/attainia-web-components/statuses/0d45aeac256bf86faa06d68b80e98e82e0573a59","head":{"label":"Attainia:feature/modal","ref":"feature/modal","sha":"0d45aeac256bf86faa06d68b80e98e82e0573a59","user":{"login":"Attainia","id":30814227,"avatar_url":"https://avatars3.githubusercontent.com/u/30814227?v=4","gravatar_id":"","url":"https://api.github.com/users/Attainia","html_url":"https://github.com/Attainia","followers_url":"https://api.github.com/users/Attainia/followers","following_url":"https://api.github.com/users/Attainia/following{/other_user}","gists_url":"https://api.github.com/users/Attainia/gists{/gist_id}","starred_url":"https://api.github.com/users/Attainia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Attainia/subscriptions","organizations_url":"https://api.github.com/users/Attainia/orgs","repos_url":"https://api.github.com/users/Attainia/repos","events_url":"https://api.github.com/users/Attainia/events{/privacy}","received_events_url":"https://api.github.com/users/Attainia/received_events","type":"Organization","site_admin":false},"repo":{"id":101922851,"name":"attainia-web-components","full_name":"Attainia/attainia-web-components","owner":{"login":"Attainia","id":30814227,"avatar_url":"https://avatars3.githubusercontent.com/u/30814227?v=4","gravatar_id":"","url":"https://api.github.com/users/Attainia","html_url":"https://github.com/Attainia","followers_url":"https://api.github.com/users/Attainia/followers","following_url":"https://api.github.com/users/Attainia/following{/other_user}","gists_url":"https://api.github.com/users/Attainia/gists{/gist_id}","starred_url":"https://api.github.com/users/Attainia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Attainia/subscriptions","organizations_url":"https://api.github.com/users/Attainia/orgs","repos_url":"https://api.github.com/users/Attainia/repos","events_url":"https://api.github.com/users/Attainia/events{/privacy}","received_events_url":"https://api.github.com/users/Attainia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Attainia/attainia-web-components","description":"This repository contains modularized JavaScript and CSS meant to be used in an Attainia web application (built using the React.js framework).","fork":false,"url":"https://api.github.com/repos/Attainia/attainia-web-components","forks_url":"https://api.github.com/repos/Attainia/attainia-web-components/forks","keys_url":"https://api.github.com/repos/Attainia/attainia-web-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Attainia/attainia-web-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Attainia/attainia-web-components/teams","hooks_url":"https://api.github.com/repos/Attainia/attainia-web-components/hooks","issue_events_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/events{/number}","events_url":"https://api.github.com/repos/Attainia/attainia-web-components/events","assignees_url":"https://api.github.com/repos/Attainia/attainia-web-components/assignees{/user}","branches_url":"https://api.github.com/repos/Attainia/attainia-web-components/branches{/branch}","tags_url":"https://api.github.com/repos/Attainia/attainia-web-components/tags","blobs_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Attainia/attainia-web-components/statuses/{sha}","languages_url":"https://api.github.com/repos/Attainia/attainia-web-components/languages","stargazers_url":"https://api.github.com/repos/Attainia/attainia-web-components/stargazers","contributors_url":"https://api.github.com/repos/Attainia/attainia-web-components/contributors","subscribers_url":"https://api.github.com/repos/Attainia/attainia-web-components/subscribers","subscription_url":"https://api.github.com/repos/Attainia/attainia-web-components/subscription","commits_url":"https://api.github.com/repos/Attainia/attainia-web-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Attainia/attainia-web-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Attainia/attainia-web-components/contents/{+path}","compare_url":"https://api.github.com/repos/Attainia/attainia-web-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Attainia/attainia-web-components/merges","archive_url":"https://api.github.com/repos/Attainia/attainia-web-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Attainia/attainia-web-components/downloads","issues_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues{/number}","pulls_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls{/number}","milestones_url":"https://api.github.com/repos/Attainia/attainia-web-components/milestones{/number}","notifications_url":"https://api.github.com/repos/Attainia/attainia-web-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Attainia/attainia-web-components/labels{/name}","releases_url":"https://api.github.com/repos/Attainia/attainia-web-components/releases{/id}","deployments_url":"https://api.github.com/repos/Attainia/attainia-web-components/deployments","created_at":"2017-08-30T19:52:42Z","updated_at":"2018-01-30T00:47:21Z","pushed_at":"2018-02-26T23:34:26Z","git_url":"git://github.com/Attainia/attainia-web-components.git","ssh_url":"git@github.com:Attainia/attainia-web-components.git","clone_url":"https://github.com/Attainia/attainia-web-components.git","svn_url":"https://github.com/Attainia/attainia-web-components","homepage":null,"size":1175,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"Attainia:development","ref":"development","sha":"2f4dbd1c674cf77cd12a2aedfcf3211b9c8f74f3","user":{"login":"Attainia","id":30814227,"avatar_url":"https://avatars3.githubusercontent.com/u/30814227?v=4","gravatar_id":"","url":"https://api.github.com/users/Attainia","html_url":"https://github.com/Attainia","followers_url":"https://api.github.com/users/Attainia/followers","following_url":"https://api.github.com/users/Attainia/following{/other_user}","gists_url":"https://api.github.com/users/Attainia/gists{/gist_id}","starred_url":"https://api.github.com/users/Attainia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Attainia/subscriptions","organizations_url":"https://api.github.com/users/Attainia/orgs","repos_url":"https://api.github.com/users/Attainia/repos","events_url":"https://api.github.com/users/Attainia/events{/privacy}","received_events_url":"https://api.github.com/users/Attainia/received_events","type":"Organization","site_admin":false},"repo":{"id":101922851,"name":"attainia-web-components","full_name":"Attainia/attainia-web-components","owner":{"login":"Attainia","id":30814227,"avatar_url":"https://avatars3.githubusercontent.com/u/30814227?v=4","gravatar_id":"","url":"https://api.github.com/users/Attainia","html_url":"https://github.com/Attainia","followers_url":"https://api.github.com/users/Attainia/followers","following_url":"https://api.github.com/users/Attainia/following{/other_user}","gists_url":"https://api.github.com/users/Attainia/gists{/gist_id}","starred_url":"https://api.github.com/users/Attainia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Attainia/subscriptions","organizations_url":"https://api.github.com/users/Attainia/orgs","repos_url":"https://api.github.com/users/Attainia/repos","events_url":"https://api.github.com/users/Attainia/events{/privacy}","received_events_url":"https://api.github.com/users/Attainia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Attainia/attainia-web-components","description":"This repository contains modularized JavaScript and CSS meant to be used in an Attainia web application (built using the React.js framework).","fork":false,"url":"https://api.github.com/repos/Attainia/attainia-web-components","forks_url":"https://api.github.com/repos/Attainia/attainia-web-components/forks","keys_url":"https://api.github.com/repos/Attainia/attainia-web-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Attainia/attainia-web-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Attainia/attainia-web-components/teams","hooks_url":"https://api.github.com/repos/Attainia/attainia-web-components/hooks","issue_events_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/events{/number}","events_url":"https://api.github.com/repos/Attainia/attainia-web-components/events","assignees_url":"https://api.github.com/repos/Attainia/attainia-web-components/assignees{/user}","branches_url":"https://api.github.com/repos/Attainia/attainia-web-components/branches{/branch}","tags_url":"https://api.github.com/repos/Attainia/attainia-web-components/tags","blobs_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Attainia/attainia-web-components/statuses/{sha}","languages_url":"https://api.github.com/repos/Attainia/attainia-web-components/languages","stargazers_url":"https://api.github.com/repos/Attainia/attainia-web-components/stargazers","contributors_url":"https://api.github.com/repos/Attainia/attainia-web-components/contributors","subscribers_url":"https://api.github.com/repos/Attainia/attainia-web-components/subscribers","subscription_url":"https://api.github.com/repos/Attainia/attainia-web-components/subscription","commits_url":"https://api.github.com/repos/Attainia/attainia-web-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/Attainia/attainia-web-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/Attainia/attainia-web-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/Attainia/attainia-web-components/contents/{+path}","compare_url":"https://api.github.com/repos/Attainia/attainia-web-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Attainia/attainia-web-components/merges","archive_url":"https://api.github.com/repos/Attainia/attainia-web-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Attainia/attainia-web-components/downloads","issues_url":"https://api.github.com/repos/Attainia/attainia-web-components/issues{/number}","pulls_url":"https://api.github.com/repos/Attainia/attainia-web-components/pulls{/number}","milestones_url":"https://api.github.com/repos/Attainia/attainia-web-components/milestones{/number}","notifications_url":"https://api.github.com/repos/Attainia/attainia-web-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Attainia/attainia-web-components/labels{/name}","releases_url":"https://api.github.com/repos/Attainia/attainia-web-components/releases{/id}","deployments_url":"https://api.github.com/repos/Attainia/attainia-web-components/deployments","created_at":"2017-08-30T19:52:42Z","updated_at":"2018-01-30T00:47:21Z","pushed_at":"2018-02-26T23:34:26Z","git_url":"git://github.com/Attainia/attainia-web-components.git","ssh_url":"git@github.com:Attainia/attainia-web-components.git","clone_url":"https://github.com/Attainia/attainia-web-components.git","svn_url":"https://github.com/Attainia/attainia-web-components","homepage":null,"size":1175,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73"},"html":{"href":"https://github.com/Attainia/attainia-web-components/pull/73"},"issue":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/issues/73"},"comments":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/Attainia/attainia-web-components/statuses/0d45aeac256bf86faa06d68b80e98e82e0573a59"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"arizonatribe"}}