eggheadio / egghead-ui

egghead UI pieces as a package and app
https://styleguide.egghead.io
28 stars 6 forks source link

Unique id for toggle #70

Closed theianjones closed 7 years ago

theianjones commented 7 years ago

Changes

notes:

If there were two toggles on the page the left radio input would toggle the first Toggle

theianjones commented 7 years ago

If there is more than one space, only the 1st space will be filled with a hyphen, regex replaces all of them. I can't think of any reasons not to use regex in this case. What do you think @tayiorbeii?

> "a string with spaces".replace(/\s/g, "+")
'a+string+with+spaces'
> "a string with spaces".replace(" ", "-")
'a-string with spaces'
tayiorbeii commented 7 years ago

@ijones16 Good call! Regex works 👍

trevordmiller commented 7 years ago

Hey @ijones16, the 3.2.1 git tag never got pushed so a new npm version wont get published; did you run yarn bump instead of bumping the package.json version manully? If so, you must have had a dirty git state and the yarn bump script threw an error. You'll need to run git push --tags manually. In the future, make sure to commit, stage, push, then yarn bump and then the package.json version and git tags will match and a new npm version will get published.

theianjones commented 7 years ago

Sorry about that, I ran yarn bump but I think my git state was dirty.

I just ran git push --tags

trevordmiller commented 7 years ago

@ijones16 Oh no problem, just wanted to make sure your package got pushed ok. You can see that it has been released correctly now so you should be good to yarn upgrade egghead-ui and get 3.2.1: https://www.npmjs.com/package/egghead-ui