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

zendeskgarden / react-components / f3d00f1e-ceae-4d36-ba47-a3042f45e7eb

01 Apr 2024 11:34AM UTC coverage: 96.194%. Remained the same
f3d00f1e-ceae-4d36-ba47-a3042f45e7eb

push

circleci

web-flow
chore(deps): update typescript-eslint monorepo to v7

3321 of 3659 branches covered (90.76%)

Branch coverage included in aggregate %.

10076 of 10268 relevant lines covered (98.13%)

215.9 hits per line

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

43.75
/packages/accordions/src/styled/timeline/StyledItemIcon.ts
1
/**
2
 * Copyright Zendesk, Inc.
3
 *
4
 * Use of this source code is governed under the Apache License, Version 2.0
5
 * found at http://www.apache.org/licenses/LICENSE-2.0.
6
 */
7

8
import { cloneElement, Children } from 'react';
14✔
9
import styled from 'styled-components';
14✔
10
import { math } from 'polished';
14✔
11
import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
14✔
12

13
const COMPONENT_ID = 'timeline.icon';
14✔
14

15
interface IStyledItemIcon {
16
  surfaceColor?: string;
17
}
18

19
/**
20
 * 1. Odd sizing allows the timeline line to center respective of the circle icon.
21
 */
22
// eslint-disable-next-line @typescript-eslint/no-unused-vars
23
export const StyledItemIcon = styled(({ surfaceColor, children, ...props }) =>
14✔
24
  cloneElement(Children.only(children), props)
×
25
).attrs({
26
  'data-garden-id': COMPONENT_ID,
27
  'data-garden-version': PACKAGE_VERSION
28
})<IStyledItemIcon>`
29
  z-index: 1;
30
  box-sizing: content-box;
31
  background-color: ${props =>
32
    props.surfaceColor || getColorV8('background', 600 /* default shade */, props.theme)};
×
33
  padding: ${props => props.theme.space.base}px 0;
×
34
  width: ${props => math(`${props.theme.iconSizes.sm} + 1`)}; /* [1] */
×
35
  height: ${props => math(`${props.theme.iconSizes.sm} + 1`)}; /* [1] */
×
36
  color: ${props => getColorV8('neutralHue', 600, props.theme)};
×
37

38
  ${props => retrieveComponentStyles(COMPONENT_ID, props)};
×
39
`;
40

41
StyledItemIcon.defaultProps = {
14✔
42
  theme: DEFAULT_THEME
43
};
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