UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

31 lines 882 B
import * as React from "react"; import styled from "styled-components"; import Badge from "../Badge"; import { StyledBadge } from "../primitives/BadgePrimitive"; import defaultTheme from "../defaultTheme"; const StyledNotificationBadge = styled.div.withConfig({ displayName: "NotificationBadge__StyledNotificationBadge", componentId: "sc-15j4hj9-0" })(["", "{width:", ";padding:0;}"], StyledBadge, ({ theme }) => theme.orbit.widthBadgeCircled); StyledNotificationBadge.defaultProps = { theme: defaultTheme }; const NotificationBadge = ({ type, children, icon, ariaLabel, dataTest, id }) => { return /*#__PURE__*/React.createElement(StyledNotificationBadge, null, /*#__PURE__*/React.createElement(Badge, { type: type, dataTest: dataTest, id: id, icon: icon, ariaLabel: ariaLabel }, !icon && children)); }; export default NotificationBadge;