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

deriv-com / deriv-com-v2 / 7271901880

20 Dec 2023 06:37AM CUT coverage: 84.786%. First build
7271901880

Pull #279

github

web-flow
Merge 79007a3e6 into f8cf52671
Pull Request #279: Hasan/chore: fixed live market card

210 of 278 branches covered (0.0%)

Branch coverage included in aggregate %.

8 of 15 new or added lines in 2 files covered. (53.33%)

7514 of 8832 relevant lines covered (85.08%)

3.86 hits per line

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

42.86
/libs/components/src/lib/tab/base/index.tsx
1
import {
2✔
2
  Children,
2✔
3
  ComponentProps,
2✔
4
  ReactNode,
2✔
5
  cloneElement,
2✔
6
  isValidElement,
2✔
7
} from 'react';
2✔
8
import { Tab } from '@deriv/quill-design';
2✔
9

2✔
10
export interface TabProps {
2✔
11
  tabs: ComponentProps<typeof Tab.Trigger>[];
2✔
12
  className?: string;
2✔
13
  children: ReactNode;
2✔
14
}
2✔
15

2✔
16
export const TabBase = ({ tabs, children, className }: TabProps) => {
2✔
17
  return (
×
18
    <Tab.Container className={className}>
×
19
      <Tab.List>
×
20
        {tabs.map(({ children, ...rest }, i) => (
×
21
          <Tab.Trigger {...rest} key={i}>
×
22
            {children}
×
23
          </Tab.Trigger>
×
NEW
24
        ))}
×
NEW
25
      </Tab.List>
×
NEW
26
      <Tab.Content>
×
NEW
27
        {Children.map(children, (child) => {
×
NEW
28
          if (!isValidElement(child)) return null;
×
NEW
29
          return (
×
NEW
30
            <Tab.Panel>
×
31
              {cloneElement(child, {
×
32
                ...child.props,
×
33
              })}
×
34
            </Tab.Panel>
×
35
          );
×
36
        })}
×
37
      </Tab.Content>
×
38
    </Tab.Container>
×
39
  );
×
40
};
×
41

2✔
42
export default TabBase;
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