Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 1763af1

Browse files
committed
regenerate components
1 parent dfe0b63 commit 1763af1

File tree

131 files changed

+1690
-2600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1690
-2600
lines changed

lib/metadata.json

Lines changed: 390 additions & 390 deletions
Large diffs are not rendered by default.

src/components/A.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const A = (props) => {
77
<a
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const A = (props) => {
2623

2724
A.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
A.propTypes = {
@@ -49,15 +46,11 @@ A.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Abbr.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Abbr = (props) => {
77
<abbr
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Abbr = (props) => {
2623

2724
Abbr.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Abbr.propTypes = {
@@ -49,15 +46,11 @@ Abbr.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Acronym.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Acronym = (props) => {
77
<acronym
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Acronym = (props) => {
2623

2724
Acronym.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Acronym.propTypes = {
@@ -49,15 +46,11 @@ Acronym.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Address.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Address = (props) => {
77
<address
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Address = (props) => {
2623

2724
Address.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Address.propTypes = {
@@ -49,15 +46,11 @@ Address.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Area.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Area = (props) => {
77
<area
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Area = (props) => {
2623

2724
Area.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Area.propTypes = {
@@ -49,15 +46,11 @@ Area.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Article.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Article = (props) => {
77
<article
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Article = (props) => {
2623

2724
Article.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Article.propTypes = {
@@ -49,15 +46,11 @@ Article.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Aside.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Aside = (props) => {
77
<aside
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Aside = (props) => {
2623

2724
Aside.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Aside.propTypes = {
@@ -49,15 +46,11 @@ Aside.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

src/components/Audio.react.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const Audio = (props) => {
77
<audio
88
onClick={() => {
99
if (props.setProps) {
10-
const newProps = {
11-
n_clicks: props.n_clicks + 1
12-
}
13-
if (newProps.n_clicks > 1) {
14-
newProps.n_clicks_previous = props.n_clicks_previous + 1;
15-
}
16-
props.setProps(newProps);
10+
props.setProps({
11+
n_clicks: props.n_clicks + 1,
12+
n_clicks_timestamp: Date.now()
13+
})
1714
}
1815
if (props.fireEvent) props.fireEvent({event: 'click'});
1916
}}
@@ -26,7 +23,7 @@ const Audio = (props) => {
2623

2724
Audio.defaultProps = {
2825
n_clicks: 0,
29-
n_clicks_previous: 0
26+
n_clicks_timestamp: -1
3027
};
3128

3229
Audio.propTypes = {
@@ -49,15 +46,11 @@ Audio.propTypes = {
4946
'n_clicks': PropTypes.integer,
5047

5148
/**
52-
* An integer that represents the number of times
53-
* that this element was clicked on. If this is the same as
54-
* `n_clicks`, then the button wasn't clicked on.
55-
* If it is less than `n_clicks`, then the button
56-
* was clicked on. This is useful in callbacks that have
57-
* multiple buttons and you need to know _which_ button
58-
* was clicked on.
59-
*/
60-
'n_clicks_previous': PropTypes.integer,
49+
* An integer that represents the time (in ms since 1970)
50+
* at which n_clicks changed. This can be used to tell
51+
* which button was changed most recently.
52+
*/
53+
'n_clicks_timestamp': PropTypes.integer,
6154

6255
/**
6356
* A unique identifier for the component, used to improve

0 commit comments

Comments
 (0)