{"action":"created","issue":{"url":"https://api.github.com/repos/JedWatson/classnames/issues/65","labels_url":"https://api.github.com/repos/JedWatson/classnames/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/JedWatson/classnames/issues/65/comments","events_url":"https://api.github.com/repos/JedWatson/classnames/issues/65/events","html_url":"https://github.com/JedWatson/classnames/issues/65","id":123789697,"number":65,"title":"help required: classNames with 'props'","user":{"login":"ssjogus","id":8896732,"avatar_url":"https://avatars.githubusercontent.com/u/8896732?v=3","gravatar_id":"","url":"https://api.github.com/users/ssjogus","html_url":"https://github.com/ssjogus","followers_url":"https://api.github.com/users/ssjogus/followers","following_url":"https://api.github.com/users/ssjogus/following{/other_user}","gists_url":"https://api.github.com/users/ssjogus/gists{/gist_id}","starred_url":"https://api.github.com/users/ssjogus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssjogus/subscriptions","organizations_url":"https://api.github.com/users/ssjogus/orgs","repos_url":"https://api.github.com/users/ssjogus/repos","events_url":"https://api.github.com/users/ssjogus/events{/privacy}","received_events_url":"https://api.github.com/users/ssjogus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-24T10:47:24Z","updated_at":"2015-12-28T11:07:13Z","closed_at":null,"body":"hi,\r\n\r\nthanks for wonderful add-on. question that I have is, can i use it with props? can i check conditionally what props value component has, and then add the class?\r\ne.g:\r\n```\r\n  var btnClass = classNames({\r\n      'btn btn-sm': true,\r\n      'btn-success': this.props.flag.success,\r\n      'btn-warning': this.props.flag.warning\r\n    });\r\n  return <button className={btnClass}  >{this.props.label}</button>;\r\n//-----------------\r\n  <Button label='click here'  flag='success'/>\r\n  <Button label='click here'  flag='warning'/>\r\n```\r\n\r\nThanks for help"},"comment":{"url":"https://api.github.com/repos/JedWatson/classnames/issues/comments/167543093","html_url":"https://github.com/JedWatson/classnames/issues/65#issuecomment-167543093","issue_url":"https://api.github.com/repos/JedWatson/classnames/issues/65","id":167543093,"user":{"login":"ssjogus","id":8896732,"avatar_url":"https://avatars.githubusercontent.com/u/8896732?v=3","gravatar_id":"","url":"https://api.github.com/users/ssjogus","html_url":"https://github.com/ssjogus","followers_url":"https://api.github.com/users/ssjogus/followers","following_url":"https://api.github.com/users/ssjogus/following{/other_user}","gists_url":"https://api.github.com/users/ssjogus/gists{/gist_id}","starred_url":"https://api.github.com/users/ssjogus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssjogus/subscriptions","organizations_url":"https://api.github.com/users/ssjogus/orgs","repos_url":"https://api.github.com/users/ssjogus/repos","events_url":"https://api.github.com/users/ssjogus/events{/privacy}","received_events_url":"https://api.github.com/users/ssjogus/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T11:07:13Z","updated_at":"2015-12-28T11:07:13Z","body":"hi @JulienMelissas ,\r\n\r\nthanks for your answer..i was writing it in wrong way..\r\n\r\nyour answer **'btn-success': this.props.flag === 'success'**\r\n\r\nworked really well. \r\n\r\nthanks once again.."}}