{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/remark-react/issues/28","repository_url":"https://api.github.com/repos/mapbox/remark-react","labels_url":"https://api.github.com/repos/mapbox/remark-react/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/remark-react/issues/28/comments","events_url":"https://api.github.com/repos/mapbox/remark-react/issues/28/events","html_url":"https://github.com/mapbox/remark-react/issues/28","id":184475149,"number":28,"title":"Table align not working","user":{"login":"noradaiko","id":1332805,"avatar_url":"https://avatars.githubusercontent.com/u/1332805?v=3","gravatar_id":"","url":"https://api.github.com/users/noradaiko","html_url":"https://github.com/noradaiko","followers_url":"https://api.github.com/users/noradaiko/followers","following_url":"https://api.github.com/users/noradaiko/following{/other_user}","gists_url":"https://api.github.com/users/noradaiko/gists{/gist_id}","starred_url":"https://api.github.com/users/noradaiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noradaiko/subscriptions","organizations_url":"https://api.github.com/users/noradaiko/orgs","repos_url":"https://api.github.com/users/noradaiko/repos","events_url":"https://api.github.com/users/noradaiko/events{/privacy}","received_events_url":"https://api.github.com/users/noradaiko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-21T12:37:32Z","updated_at":"2016-10-24T02:04:50Z","closed_at":null,"body":"React ignores `align` property since this property is obsolete in HTML5.\r\n`align` is not listed as supported attribute: https://facebook.github.io/react/docs/tags-and-attributes.html\r\nIt should use CSS instead."},"comment":{"url":"https://api.github.com/repos/mapbox/remark-react/issues/comments/255632770","html_url":"https://github.com/mapbox/remark-react/issues/28#issuecomment-255632770","issue_url":"https://api.github.com/repos/mapbox/remark-react/issues/28","id":255632770,"user":{"login":"noradaiko","id":1332805,"avatar_url":"https://avatars.githubusercontent.com/u/1332805?v=3","gravatar_id":"","url":"https://api.github.com/users/noradaiko","html_url":"https://github.com/noradaiko","followers_url":"https://api.github.com/users/noradaiko/followers","following_url":"https://api.github.com/users/noradaiko/following{/other_user}","gists_url":"https://api.github.com/users/noradaiko/gists{/gist_id}","starred_url":"https://api.github.com/users/noradaiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noradaiko/subscriptions","organizations_url":"https://api.github.com/users/noradaiko/orgs","repos_url":"https://api.github.com/users/noradaiko/repos","events_url":"https://api.github.com/users/noradaiko/events{/privacy}","received_events_url":"https://api.github.com/users/noradaiko/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T02:04:50Z","updated_at":"2016-10-24T02:04:50Z","body":"found a way to avoid this issue using `remarkReactComponents`:\r\n\r\n```js\r\nimport React, { createElement } from 'react'\r\nimport remark from 'remark'\r\nimport remarkReact from 'remark-react'\r\n\r\nfunction createTableCellComponent (tagName) {\r\n  return class TableCell extends React.Component {\r\n    render () {\r\n      const style = { textAlign: this.props.align }\r\n      const props = { ...this.props, style }\r\n      return createElement(tagName, props, this.props.children)\r\n    }\r\n  }\r\n}\r\n\r\nconst options = {\r\n  remarkReactComponents: {\r\n    td: createTableCellComponent('td'),\r\n    th: createTableCellComponent('th')\r\n  }\r\n}\r\nconst processor = remark().use(remarkReact, options)\r\n```"}}
{"actor":{"display_login":"noradaiko"}}