Skip to content

Commit 373bfdd

Browse files
committed
1.0.5
* Simplifying API for components with no labels
1 parent dae83f4 commit 373bfdd

File tree

8 files changed

+23
-11
lines changed

8 files changed

+23
-11
lines changed

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"markdown": "^0.5.0",
2323
"moize": "^5.4.1",
2424
"pretty-checkbox": "^3.0.3",
25-
"pretty-checkbox-react": "^0.0.10",
25+
"pretty-checkbox-react": "^1.0.0",
2626
"react": "^16.7.0",
2727
"react-dom": "^16.7.0",
2828
"react-live": "^1.12.0",

docs/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -8248,10 +8248,10 @@ pretty-bytes@^4.0.2:
82488248
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
82498249
integrity sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=
82508250

8251-
pretty-checkbox-react@^0.0.10:
8252-
version "0.0.10"
8253-
resolved "https://registry.yarnpkg.com/pretty-checkbox-react/-/pretty-checkbox-react-0.0.10.tgz#31471b2fe8c1ec58911badc0e1cd81b41194a00f"
8254-
integrity sha512-qV95HUpQa4h6x6LRZSJKn+skKqo0TXDmuXybot2EaT9gOFcHIheNC17yE11t74n2N8x1Q/Hcq8+eO/+MR51DXw==
8251+
pretty-checkbox-react@^1.0.0:
8252+
version "1.0.4"
8253+
resolved "https://registry.yarnpkg.com/pretty-checkbox-react/-/pretty-checkbox-react-1.0.4.tgz#1a5a0afaa5d3b6ae1d0445286b2140c21d8a6124"
8254+
integrity sha512-cSWUkVavIcPPIvCcYA+UZe6yclcrQ6D+a5v3MpqAqfvNh1hj9xMIaiPvwTB/0GH2LoqkbSVxsLTulEgZH8wLaw==
82558255
dependencies:
82568256
classnames "^2.2.6"
82578257

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pretty-checkbox-react",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Quickly integrate pretty checkbox Components (checkbox, switch, radio) with React",
55
"keywords": [
66
"Pretty",

src/components/Input.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const PrettyInputState = (props: InputProps): React.Node => {
203203
return (
204204
<div className={classNames('state', color ? PREFIX + color : null)} data-testid="pcr-state">
205205
{node ? fillClassNameForIcons(node.node, node.className) : null}
206-
{children ? <label htmlFor={id}>{children}</label> : null}
206+
<label htmlFor={id}>{children}</label>
207207
</div>
208208
);
209209
};

src/components/__tests__/__snapshots__/Checkbox.test.js.snap

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ exports[`Checkbox tests Basic Checkbox usage should behave as a checkbox 1`] = `
1515
<div
1616
class="state"
1717
data-testid="pcr-state"
18-
/>
18+
>
19+
<label
20+
for="foo"
21+
/>
22+
</div>
1923
</div>
2024
</div>
2125
`;

src/components/__tests__/__snapshots__/Radio.test.js.snap

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ exports[`Radio tests Radio usage as a radio should behave as a radio 1`] = `
1515
<div
1616
class="state"
1717
data-testid="pcr-state"
18-
/>
18+
>
19+
<label
20+
for="foo"
21+
/>
22+
</div>
1923
</div>
2024
</div>
2125
`;

src/components/__tests__/__snapshots__/Switch.test.js.snap

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ exports[`Switch tests Switch usage as a radio should behave as a radio 1`] = `
1515
<div
1616
class="state"
1717
data-testid="pcr-state"
18-
/>
18+
>
19+
<label
20+
for="foo"
21+
/>
22+
</div>
1923
</div>
2024
</div>
2125
`;

0 commit comments

Comments
 (0)