{"action":"created","issue":{"url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/56","labels_url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/56/comments","events_url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/56/events","html_url":"https://github.com/holidayextras/ui-toolkit/pull/56","id":99611401,"number":56,"title":"Adding href & data attributes to image","user":{"login":"jackdcrawford","id":1485654,"avatar_url":"https://avatars.githubusercontent.com/u/1485654?v=3","gravatar_id":"","url":"https://api.github.com/users/jackdcrawford","html_url":"https://github.com/jackdcrawford","followers_url":"https://api.github.com/users/jackdcrawford/followers","following_url":"https://api.github.com/users/jackdcrawford/following{/other_user}","gists_url":"https://api.github.com/users/jackdcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/jackdcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackdcrawford/subscriptions","organizations_url":"https://api.github.com/users/jackdcrawford/orgs","repos_url":"https://api.github.com/users/jackdcrawford/repos","events_url":"https://api.github.com/users/jackdcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/jackdcrawford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-07T09:10:59Z","updated_at":"2015-08-07T09:20:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/holidayextras/ui-toolkit/pulls/56","html_url":"https://github.com/holidayextras/ui-toolkit/pull/56","diff_url":"https://github.com/holidayextras/ui-toolkit/pull/56.diff","patch_url":"https://github.com/holidayextras/ui-toolkit/pull/56.patch"},"body":"#### What does this PR do? (please provide any background)\r\nThere have already been a few cases where we want to be able to pass an `href` into the `Image` component, this adds that functionality by wrapping the image in an anchor if an `href` is passed in as a prop.\r\n\r\nThis also adds the [react-data-attributes-mixin](https://github.com/holidayextras/react-data-attributes-mixin).\r\n\r\n#### What tests does this PR have?\r\nUpdated the image tests to support the `href` wrapping in an anchor logic\r\n\r\n#### How can this be tested?\r\n```\r\ngit checkout img-href\r\ngrunt docs\r\n```\r\n* Navigate to [http://localhost:4000/#image](http://localhost:4000/#image)\r\n* Inspect the element, you should see a single `<img />` element\r\n* Open the editor with \"show code\"\r\n* Add an `href` attribute to the example\r\n* Inspect the element again, you should see it wrapped in an `<a /> element\r\n* Add a `data` attribute & inspect the element to see the data attributes\r\n\r\n#### Screenshots / Screencast\r\n![a > img](https://cldup.com/Abah7NpsbS.png)\r\n\r\n#### What gif best describes how you feel about this work?\r\n![catz](http://tclhost.com/xb9NbV8.gif)\r\n\r\n---\r\n#### Developer Definition of Done/Quality Checklist (for PR author to complete BEFORE code review):\r\n- [x] I have checked the [contributing document](../blob/master/CONTRIBUTING.md) and I'm happy for this to be reviewed.\r\n\r\n#### Software Engineer or Developer review:\r\n- [ ] I’ve witnessed the work behaving as expected (this could be on the authors machine or screencast).\r\n- [ ] I’ve checked for coding anti-patterns.\r\n- [ ] I’ve checked for appropriate test coverage.\r\n- [ ] I’ve checked all the tests are passing.\r\n\r\n#### Software Engineer or project guru review:\r\n- [ ] I’ve witnessed the work behaving as expected (this could be on the authors machine or screencast).\r\n- [ ] I’ve checked for coding anti-patterns.\r\n- [ ] I’ve checked for appropriate test coverage.\r\n- [ ] I’ve checked all the tests are passing."},"comment":{"url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/comments/128650699","html_url":"https://github.com/holidayextras/ui-toolkit/pull/56#issuecomment-128650699","issue_url":"https://api.github.com/repos/holidayextras/ui-toolkit/issues/56","id":128650699,"user":{"login":"nickine","id":3897844,"avatar_url":"https://avatars.githubusercontent.com/u/3897844?v=3","gravatar_id":"","url":"https://api.github.com/users/nickine","html_url":"https://github.com/nickine","followers_url":"https://api.github.com/users/nickine/followers","following_url":"https://api.github.com/users/nickine/following{/other_user}","gists_url":"https://api.github.com/users/nickine/gists{/gist_id}","starred_url":"https://api.github.com/users/nickine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickine/subscriptions","organizations_url":"https://api.github.com/users/nickine/orgs","repos_url":"https://api.github.com/users/nickine/repos","events_url":"https://api.github.com/users/nickine/events{/privacy}","received_events_url":"https://api.github.com/users/nickine/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T09:20:52Z","updated_at":"2015-08-07T09:20:52Z","body":"Taking SE/Dev\r\n"}}