Skip to content

Commit

Permalink
feat: gray the button when clap count exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinEberhardt committed Jan 11, 2021
1 parent ce928ae commit 7d346ef
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,35 @@ The above will render an applause button, persisting claps and clap counts.

For more information, visit the [project website](https://colineberhardt.github.io/applause-button/);

## Development

Clone this repo and install dependencies via yarn:

~~~
$ yarn
~~~

Use `yarn test` to run the test suite. These use Jest as the test runner, and Puppeteer as a headless Chrome instance, allowing the applause button to make API requests (with appropriate responses faked within the test code).

You can build project and start watching the `src` folder for changes as follows:

~~~
$ yarn run watch
~~~

Run `yarn test:server` to start a dev server in another process.







### Releases

All releases are created automatically via [semantic release](https://github.com/semantic-release/semantic-release) running on Travis.


## Contributors

This project exists thanks to all the people who contribute.
Expand Down
12 changes: 11 additions & 1 deletion src/applause-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

applause-button {
position: relative;
cursor:pointer;
cursor: pointer;

.style-root {
@include position-fill();
Expand Down Expand Up @@ -65,6 +65,16 @@ applause-button {
}
}

&.clap-limit-exceeded {
cursor: inherit;
div {
fill: gray !important;
stroke: gray !important;
color: gray !important;
}

}

&.clapped {
svg {
g.flat {
Expand Down

0 comments on commit 7d346ef

Please sign in to comment.