{"action":"created","comment":{"url":"https://api.github.com/repos/economist-components/component-link-button/pulls/comments/47251632","id":47251632,"diff_hunk":"@@ -14,11 +18,19 @@ export default function Button(props) {\n   if (shadow === true) {\n     extraClassNames.push('link-button--shadow');\n   }\n+  let content = children;\n+  const linkProps = {...props};\n+  if (icon) {\n+    extraClassNames.push('link-button--icon');\n+    content = [ (<Icon {...icon} />), (<span className=\"link-button__text\">{content}</span>) ];\n+    // We don't want this prop spreaded on <a> tag.\n+    delete linkProps.icon;\n+  }\n   return (\n-    <a role=\"button\" {...props} onClick={onClick}\n+    <a role=\"button\" {...linkProps} onClick={onClick}","path":"index.es6","position":32,"original_position":32,"commit_id":"39646cf2ab951a792d126089c9d3fdc456025cdf","original_commit_id":"39646cf2ab951a792d126089c9d3fdc456025cdf","user":{"login":"danielmoll","id":1107257,"avatar_url":"https://avatars.githubusercontent.com/u/1107257?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmoll","html_url":"https://github.com/danielmoll","followers_url":"https://api.github.com/users/danielmoll/followers","following_url":"https://api.github.com/users/danielmoll/following{/other_user}","gists_url":"https://api.github.com/users/danielmoll/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoll/subscriptions","organizations_url":"https://api.github.com/users/danielmoll/orgs","repos_url":"https://api.github.com/users/danielmoll/repos","events_url":"https://api.github.com/users/danielmoll/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoll/received_events","type":"User","site_admin":false},"body":"Accessibility wise there maybe a case where you'd rather have an actual `<button>` tag - ideally a button is used when the interaction doesn't take you away from the page - think hamburger, for example. Although you have the `role=\"button\"` attribute I'm unsure about how that's handled in screen readers/voice over.","created_at":"2015-12-10T16:50:11Z","updated_at":"2015-12-10T16:50:11Z","html_url":"https://github.com/economist-components/component-link-button/pull/3#discussion_r47251632","pull_request_url":"https://api.github.com/repos/economist-components/component-link-button/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/comments/47251632"},"html":{"href":"https://github.com/economist-components/component-link-button/pull/3#discussion_r47251632"},"pull_request":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/economist-components/component-link-button/pulls/3","id":53268523,"html_url":"https://github.com/economist-components/component-link-button/pull/3","diff_url":"https://github.com/economist-components/component-link-button/pull/3.diff","patch_url":"https://github.com/economist-components/component-link-button/pull/3.patch","issue_url":"https://api.github.com/repos/economist-components/component-link-button/issues/3","number":3,"state":"open","locked":false,"title":"Added basic icon functionality","user":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"body":"The idea behind this implementation is to simplify implementation for buttons/links with icons too keeping more consistency across projects.","created_at":"2015-12-10T14:56:42Z","updated_at":"2015-12-10T16:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c372bbebbbd6f90fa709da2e80b4ace499873743","assignee":{"login":"danielmoll","id":1107257,"avatar_url":"https://avatars.githubusercontent.com/u/1107257?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmoll","html_url":"https://github.com/danielmoll","followers_url":"https://api.github.com/users/danielmoll/followers","following_url":"https://api.github.com/users/danielmoll/following{/other_user}","gists_url":"https://api.github.com/users/danielmoll/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoll/subscriptions","organizations_url":"https://api.github.com/users/danielmoll/orgs","repos_url":"https://api.github.com/users/danielmoll/repos","events_url":"https://api.github.com/users/danielmoll/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoll/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/economist-components/component-link-button/pulls/3/commits","review_comments_url":"https://api.github.com/repos/economist-components/component-link-button/pulls/3/comments","review_comment_url":"https://api.github.com/repos/economist-components/component-link-button/pulls/comments{/number}","comments_url":"https://api.github.com/repos/economist-components/component-link-button/issues/3/comments","statuses_url":"https://api.github.com/repos/economist-components/component-link-button/statuses/39646cf2ab951a792d126089c9d3fdc456025cdf","head":{"label":"umbobabo:master","ref":"master","sha":"39646cf2ab951a792d126089c9d3fdc456025cdf","user":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"repo":{"id":47258632,"name":"component-link-button","full_name":"umbobabo/component-link-button","owner":{"login":"umbobabo","id":752680,"avatar_url":"https://avatars.githubusercontent.com/u/752680?v=3","gravatar_id":"","url":"https://api.github.com/users/umbobabo","html_url":"https://github.com/umbobabo","followers_url":"https://api.github.com/users/umbobabo/followers","following_url":"https://api.github.com/users/umbobabo/following{/other_user}","gists_url":"https://api.github.com/users/umbobabo/gists{/gist_id}","starred_url":"https://api.github.com/users/umbobabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbobabo/subscriptions","organizations_url":"https://api.github.com/users/umbobabo/orgs","repos_url":"https://api.github.com/users/umbobabo/repos","events_url":"https://api.github.com/users/umbobabo/events{/privacy}","received_events_url":"https://api.github.com/users/umbobabo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/umbobabo/component-link-button","description":"Displays a button as an <a> tag.","fork":true,"url":"https://api.github.com/repos/umbobabo/component-link-button","forks_url":"https://api.github.com/repos/umbobabo/component-link-button/forks","keys_url":"https://api.github.com/repos/umbobabo/component-link-button/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbobabo/component-link-button/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbobabo/component-link-button/teams","hooks_url":"https://api.github.com/repos/umbobabo/component-link-button/hooks","issue_events_url":"https://api.github.com/repos/umbobabo/component-link-button/issues/events{/number}","events_url":"https://api.github.com/repos/umbobabo/component-link-button/events","assignees_url":"https://api.github.com/repos/umbobabo/component-link-button/assignees{/user}","branches_url":"https://api.github.com/repos/umbobabo/component-link-button/branches{/branch}","tags_url":"https://api.github.com/repos/umbobabo/component-link-button/tags","blobs_url":"https://api.github.com/repos/umbobabo/component-link-button/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbobabo/component-link-button/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbobabo/component-link-button/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbobabo/component-link-button/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbobabo/component-link-button/statuses/{sha}","languages_url":"https://api.github.com/repos/umbobabo/component-link-button/languages","stargazers_url":"https://api.github.com/repos/umbobabo/component-link-button/stargazers","contributors_url":"https://api.github.com/repos/umbobabo/component-link-button/contributors","subscribers_url":"https://api.github.com/repos/umbobabo/component-link-button/subscribers","subscription_url":"https://api.github.com/repos/umbobabo/component-link-button/subscription","commits_url":"https://api.github.com/repos/umbobabo/component-link-button/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbobabo/component-link-button/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbobabo/component-link-button/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbobabo/component-link-button/issues/comments{/number}","contents_url":"https://api.github.com/repos/umbobabo/component-link-button/contents/{+path}","compare_url":"https://api.github.com/repos/umbobabo/component-link-button/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbobabo/component-link-button/merges","archive_url":"https://api.github.com/repos/umbobabo/component-link-button/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbobabo/component-link-button/downloads","issues_url":"https://api.github.com/repos/umbobabo/component-link-button/issues{/number}","pulls_url":"https://api.github.com/repos/umbobabo/component-link-button/pulls{/number}","milestones_url":"https://api.github.com/repos/umbobabo/component-link-button/milestones{/number}","notifications_url":"https://api.github.com/repos/umbobabo/component-link-button/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbobabo/component-link-button/labels{/name}","releases_url":"https://api.github.com/repos/umbobabo/component-link-button/releases{/id}","created_at":"2015-12-02T12:11:46Z","updated_at":"2015-12-02T12:11:46Z","pushed_at":"2015-12-10T14:55:07Z","git_url":"git://github.com/umbobabo/component-link-button.git","ssh_url":"git@github.com:umbobabo/component-link-button.git","clone_url":"https://github.com/umbobabo/component-link-button.git","svn_url":"https://github.com/umbobabo/component-link-button","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"economist-components:master","ref":"master","sha":"1cc4e7c6e7acda12e020b814dd12bf0c3f34b62a","user":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"repo":{"id":45476260,"name":"component-link-button","full_name":"economist-components/component-link-button","owner":{"login":"economist-components","id":14197671,"avatar_url":"https://avatars.githubusercontent.com/u/14197671?v=3","gravatar_id":"","url":"https://api.github.com/users/economist-components","html_url":"https://github.com/economist-components","followers_url":"https://api.github.com/users/economist-components/followers","following_url":"https://api.github.com/users/economist-components/following{/other_user}","gists_url":"https://api.github.com/users/economist-components/gists{/gist_id}","starred_url":"https://api.github.com/users/economist-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/economist-components/subscriptions","organizations_url":"https://api.github.com/users/economist-components/orgs","repos_url":"https://api.github.com/users/economist-components/repos","events_url":"https://api.github.com/users/economist-components/events{/privacy}","received_events_url":"https://api.github.com/users/economist-components/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/economist-components/component-link-button","description":"Displays a button as an <a> tag.","fork":false,"url":"https://api.github.com/repos/economist-components/component-link-button","forks_url":"https://api.github.com/repos/economist-components/component-link-button/forks","keys_url":"https://api.github.com/repos/economist-components/component-link-button/keys{/key_id}","collaborators_url":"https://api.github.com/repos/economist-components/component-link-button/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/economist-components/component-link-button/teams","hooks_url":"https://api.github.com/repos/economist-components/component-link-button/hooks","issue_events_url":"https://api.github.com/repos/economist-components/component-link-button/issues/events{/number}","events_url":"https://api.github.com/repos/economist-components/component-link-button/events","assignees_url":"https://api.github.com/repos/economist-components/component-link-button/assignees{/user}","branches_url":"https://api.github.com/repos/economist-components/component-link-button/branches{/branch}","tags_url":"https://api.github.com/repos/economist-components/component-link-button/tags","blobs_url":"https://api.github.com/repos/economist-components/component-link-button/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/economist-components/component-link-button/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/economist-components/component-link-button/git/refs{/sha}","trees_url":"https://api.github.com/repos/economist-components/component-link-button/git/trees{/sha}","statuses_url":"https://api.github.com/repos/economist-components/component-link-button/statuses/{sha}","languages_url":"https://api.github.com/repos/economist-components/component-link-button/languages","stargazers_url":"https://api.github.com/repos/economist-components/component-link-button/stargazers","contributors_url":"https://api.github.com/repos/economist-components/component-link-button/contributors","subscribers_url":"https://api.github.com/repos/economist-components/component-link-button/subscribers","subscription_url":"https://api.github.com/repos/economist-components/component-link-button/subscription","commits_url":"https://api.github.com/repos/economist-components/component-link-button/commits{/sha}","git_commits_url":"https://api.github.com/repos/economist-components/component-link-button/git/commits{/sha}","comments_url":"https://api.github.com/repos/economist-components/component-link-button/comments{/number}","issue_comment_url":"https://api.github.com/repos/economist-components/component-link-button/issues/comments{/number}","contents_url":"https://api.github.com/repos/economist-components/component-link-button/contents/{+path}","compare_url":"https://api.github.com/repos/economist-components/component-link-button/compare/{base}...{head}","merges_url":"https://api.github.com/repos/economist-components/component-link-button/merges","archive_url":"https://api.github.com/repos/economist-components/component-link-button/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/economist-components/component-link-button/downloads","issues_url":"https://api.github.com/repos/economist-components/component-link-button/issues{/number}","pulls_url":"https://api.github.com/repos/economist-components/component-link-button/pulls{/number}","milestones_url":"https://api.github.com/repos/economist-components/component-link-button/milestones{/number}","notifications_url":"https://api.github.com/repos/economist-components/component-link-button/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/economist-components/component-link-button/labels{/name}","releases_url":"https://api.github.com/repos/economist-components/component-link-button/releases{/id}","created_at":"2015-11-03T15:36:22Z","updated_at":"2015-11-04T11:44:03Z","pushed_at":"2015-12-10T14:56:43Z","git_url":"git://github.com/economist-components/component-link-button.git","ssh_url":"git@github.com:economist-components/component-link-button.git","clone_url":"https://github.com/economist-components/component-link-button.git","svn_url":"https://github.com/economist-components/component-link-button","homepage":null,"size":494,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/3"},"html":{"href":"https://github.com/economist-components/component-link-button/pull/3"},"issue":{"href":"https://api.github.com/repos/economist-components/component-link-button/issues/3"},"comments":{"href":"https://api.github.com/repos/economist-components/component-link-button/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/economist-components/component-link-button/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/economist-components/component-link-button/statuses/39646cf2ab951a792d126089c9d3fdc456025cdf"}}}}