{"action":"created","issue":{"url":"https://api.github.com/repos/Day8/re-com/issues/2","labels_url":"https://api.github.com/repos/Day8/re-com/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Day8/re-com/issues/2/comments","events_url":"https://api.github.com/repos/Day8/re-com/issues/2/events","html_url":"https://github.com/Day8/re-com/issues/2","id":67789787,"number":2,"title":"Custom styling for labels for Tabs","user":{"login":"ducky427","id":83426,"avatar_url":"https://avatars.githubusercontent.com/u/83426?v=3","gravatar_id":"","url":"https://api.github.com/users/ducky427","html_url":"https://github.com/ducky427","followers_url":"https://api.github.com/users/ducky427/followers","following_url":"https://api.github.com/users/ducky427/following{/other_user}","gists_url":"https://api.github.com/users/ducky427/gists{/gist_id}","starred_url":"https://api.github.com/users/ducky427/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ducky427/subscriptions","organizations_url":"https://api.github.com/users/ducky427/orgs","repos_url":"https://api.github.com/users/ducky427/repos","events_url":"https://api.github.com/users/ducky427/events{/privacy}","received_events_url":"https://api.github.com/users/ducky427/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-11T14:13:44Z","updated_at":"2015-04-12T08:24:53Z","closed_at":null,"body":"Hi,\r\nFirstly a great library. Its really well done!\r\n\r\nI am also building an atom-shell app using cljs, reagent and bootstrap. So this fits in really neatily into the stack.\r\n\r\nI had a suggesting for enhancement, namely being able to apply a custom function to a label on a tab. I noticed that strictly speaking it doesn't need to be a string. The label just gets nested inside a `:a` tag.\r\n\r\nI suggest that instead of `:label` being a requirement for an element `:tabs`, the user have an option to give a `label-fn` which when given an `id` produces the correct markup.\r\n\r\nMy use case is that I have dynamic tabs some of which can be closed. This can be done with the current API itself but not in a clean way.\r\n\r\nThanks!\r\n\r\nP.S. I am happy to submit a PR."},"comment":{"url":"https://api.github.com/repos/Day8/re-com/issues/comments/92008466","html_url":"https://github.com/Day8/re-com/issues/2#issuecomment-92008466","issue_url":"https://api.github.com/repos/Day8/re-com/issues/2","id":92008466,"user":{"login":"mike-thompson-day8","id":3033376,"avatar_url":"https://avatars.githubusercontent.com/u/3033376?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-thompson-day8","html_url":"https://github.com/mike-thompson-day8","followers_url":"https://api.github.com/users/mike-thompson-day8/followers","following_url":"https://api.github.com/users/mike-thompson-day8/following{/other_user}","gists_url":"https://api.github.com/users/mike-thompson-day8/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-thompson-day8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-thompson-day8/subscriptions","organizations_url":"https://api.github.com/users/mike-thompson-day8/orgs","repos_url":"https://api.github.com/users/mike-thompson-day8/repos","events_url":"https://api.github.com/users/mike-thompson-day8/events{/privacy}","received_events_url":"https://api.github.com/users/mike-thompson-day8/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T08:24:53Z","updated_at":"2015-04-12T08:24:53Z","body":"How about this compromise?  \r\n\r\nCreate a new parameter called  `:label-fn` which defaults to `:label`.  This function will be called with one parameter:  a tab spec and it is expected to \"extract\"  the appropriate string of hiccup for showing in the tab.  \r\n\r\nThat would allow you to supply a `label-fn` which looked up the `:id` of the tab and then used it to generate necessary hiccup (etc).  This approach is flexible but 100% backwards compatible (given this function defaults to `:label`)\r\n\r\nWhile we are at it, should we also create an `id-fn` which defaults to `:id`.  \r\n \r\n"}}