Skip to content

Commit 7d346ef

Browse files
feat: gray the button when clap count exceeded
1 parent ce928ae commit 7d346ef

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,35 @@ The above will render an applause button, persisting claps and clap counts.
2424

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

27+
## Development
28+
29+
Clone this repo and install dependencies via yarn:
30+
31+
~~~
32+
$ yarn
33+
~~~
34+
35+
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).
36+
37+
You can build project and start watching the `src` folder for changes as follows:
38+
39+
~~~
40+
$ yarn run watch
41+
~~~
42+
43+
Run `yarn test:server` to start a dev server in another process.
44+
45+
46+
47+
48+
49+
50+
51+
### Releases
52+
53+
All releases are created automatically via [semantic release](https://github.com/semantic-release/semantic-release) running on Travis.
54+
55+
2756
## Contributors
2857

2958
This project exists thanks to all the people who contribute.

src/applause-button.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
applause-button {
2424
position: relative;
25-
cursor:pointer;
25+
cursor: pointer;
2626

2727
.style-root {
2828
@include position-fill();
@@ -65,6 +65,16 @@ applause-button {
6565
}
6666
}
6767

68+
&.clap-limit-exceeded {
69+
cursor: inherit;
70+
div {
71+
fill: gray !important;
72+
stroke: gray !important;
73+
color: gray !important;
74+
}
75+
76+
}
77+
6878
&.clapped {
6979
svg {
7080
g.flat {

0 commit comments

Comments
 (0)