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

atomicpages / pretty-checkbox-react / 11913957799

19 Nov 2024 01:21PM UTC coverage: 100.0%. Remained the same
11913957799

Pull #1202

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.6.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.6.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 #1202: build(deps-dev): bump @commitlint/config-conventional from 17.0.2 to 19.6.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/hooks/useIcon.ts
1
import * as React from 'react';
4✔
2
import clsx from 'clsx';
4✔
3

4
import { PCRCheckboxRadioProps } from '../typings/PCRCheckboxRadioProps';
5

6
export const useIcon = (icon: PCRCheckboxRadioProps['icon']) => {
4✔
7
  return React.useMemo(() => {
33✔
8
    if (icon) {
18✔
9
      let type: 'icon' | 'svg' | 'image' = 'icon';
5✔
10

11
      if (icon.type === 'img') {
5✔
12
        type = 'image';
1✔
13
      } else if (icon.type === 'svg') {
4✔
14
        type = 'svg';
1✔
15
      }
16

17
      // icons that contain `type` substring
18
      // won't fail with a word boundary search
19
      const re = new RegExp(`\\b${type}\\b`);
5✔
20

21
      return {
5✔
22
        iconType: icon.props['data-type'] || type,
10✔
23
        icon:
24
          icon.props.className && !re.test(icon.props.className)
14✔
25
            ? React.cloneElement(icon, {
26
                ...icon.props,
27
                className: clsx(icon.props.className, type),
28
              })
29
            : icon,
30
      };
31
    }
32

33
    return {};
13✔
34
  }, [icon]);
35
};
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