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

zendeskgarden / react-components / d761da97-55be-4d70-acab-6505aff5941c

17 Apr 2024 03:30PM UTC coverage: 96.222%. First build
d761da97-55be-4d70-acab-6505aff5941c

Pull #1791

circleci

geotrev
feat: adds styled icon base component
Pull Request #1791: feat: adds styled icon base component

3281 of 3611 branches covered (90.86%)

Branch coverage included in aggregate %.

15 of 18 new or added lines in 3 files covered. (83.33%)

9963 of 10153 relevant lines covered (98.13%)

217.38 hits per line

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

77.78
/packages/theming/src/styled/StyledBaseIcon.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 styled from 'styled-components';
327✔
9
import React, { Children } from 'react';
327✔
10
import retrieveComponentStyles from '../utils/retrieveComponentStyles';
327✔
11
import DEFAULT_THEME from '../elements/theme';
327✔
12

13
const COMPONENT_ID = 'icon.base';
327✔
14

15
// eslint-disable-next-line @typescript-eslint/no-unused-vars
16
export const StyledBaseIcon = styled(({ children, theme, ...props }) =>
327✔
NEW
17
  React.cloneElement(Children.only(children), props)
×
18
).attrs({
19
  'data-garden-id': COMPONENT_ID,
20
  'data-garden-version': PACKAGE_VERSION
21
})`
NEW
22
  ${props => retrieveComponentStyles(COMPONENT_ID, props)};
×
23
`;
24

25
StyledBaseIcon.defaultProps = {
327✔
26
  theme: DEFAULT_THEME
27
};
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