• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atomicpages / pretty-checkbox-react / 8690206103

15 Apr 2024 01:41PM UTC coverage: 100.0%. Remained the same
8690206103

Pull #1092

github

web-flow
build(deps-dev): bump @commitlint/config-conventional

Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 17.0.2 to 19.2.2.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.2.2/@commitlint/config-conventional)

---
updated-dependencies:
- dependency-name: "@commitlint/config-conventional"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #1092: build(deps-dev): bump @commitlint/config-conventional from 17.0.2 to 19.2.2

67 of 67 branches covered (100.0%)

Branch coverage included in aggregate %.

172 of 172 relevant lines covered (100.0%)

9.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/components/radio/useRadioState.ts
1
import * as React from 'react';
2✔
2

3
export type UseRadioState = {
4
  state?: boolean | string;
5
  onChange?: React.InputHTMLAttributes<HTMLInputElement>['onChange'];
6
};
7

8
export const useRadioState = ({
2✔
9
  state: initialState = false,
8✔
10
  onChange,
11
}: UseRadioState = {}) => {
12
  const [state, setState] = React.useState(initialState);
8✔
13

14
  return {
8✔
15
    state,
16
    setState,
17
    onChange: React.useCallback(
18
      (e: React.ChangeEvent<HTMLInputElement>) => {
19
        const { value } = e.currentTarget;
4✔
20

21
        setState((current) => {
4✔
22
          if (value !== '') {
4✔
23
            return value;
1✔
24
          }
25

26
          return !current;
3✔
27
        });
28

29
        if (typeof onChange === 'function') {
4✔
30
          onChange(e);
2✔
31
        }
32
      },
33
      [onChange]
34
    ),
35
  };
36
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc