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

atomicpages / pretty-checkbox-react / 8250088881

12 Mar 2024 01:58PM UTC coverage: 100.0%. Remained the same
8250088881

Pull #1062

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.1.0.
- [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.1.0/@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 #1062: build(deps-dev): bump @commitlint/config-conventional from 17.0.2 to 19.1.0

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/Radio.tsx
1
import * as React from 'react';
1✔
2
import clsx from 'clsx';
1✔
3

4
import { State } from '../state/State';
1✔
5

6
import { useLocked } from '../../hooks/utility/useLocked';
1✔
7
import { useIcon } from '../../hooks/useIcon';
1✔
8
import { useClassNames } from '../../hooks/utility/useClassNames';
1✔
9
import { useControlled } from '../../hooks/utility/useControlled';
1✔
10

11
import { useCheckboxRadioProps } from '../../hooks/utility/useCheckboxRadioProps';
1✔
12
import { PCRCheckboxRadioProps } from '../../typings/PCRCheckboxRadioProps';
13
import { UseRadioState, useRadioState } from './useRadioState';
1✔
14

15
export type RadioProps = Omit<
16
  PCRCheckboxRadioProps<UseRadioState['state']>,
17
  'indeterminate'
18
>;
19

20
export const Radio = React.forwardRef<HTMLInputElement, RadioProps>(
1✔
21
  (props, ref) => {
22
    const { checked, value, state, ...rest } = useControlled<
5✔
23
      UseRadioState['state'],
24
      RadioProps
25
    >(props);
26

27
    const {
28
      shape = 'round',
5✔
29
      children,
30
      locked,
31
      color,
32
      id,
33
      className,
34
      style,
35
      icon: propsIcon,
36
      htmlProps,
37
    } = useCheckboxRadioProps<UseRadioState['state'], RadioProps>(rest);
5✔
38

39
    const styles = useLocked({ locked, style });
5✔
40
    const { icon, iconType } = useIcon(propsIcon);
5✔
41

42
    return (
5✔
43
      <div
44
        style={styles}
45
        className={clsx(
46
          'pretty',
47
          useClassNames({
48
            ...props,
49
            shape,
50
            iconType,
51
          }),
52
          className
53
        )}
54
      >
55
        <input
56
          ref={ref}
57
          value={value}
58
          type="radio"
59
          id={id}
60
          checked={checked}
61
          {...htmlProps}
62
        />
63
        <State id={id} icon={icon} color={color}>
64
          {children}
65
        </State>
66
      </div>
67
    );
68
  }
69
);
70

71
Radio.displayName = 'Radio';
1✔
72

73
export { UseRadioState, useRadioState };
2✔
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