UNPKG

@atlaskit/progress-indicator

Version:

A progress indicator shows the user where they are along the steps of a journey.

46 lines 1.66 kB
/* presentational-indicator.tsx generated by @compiled/babel-plugin v3.0.2 */ /* eslint-disable @repo/internal/react/require-jsdoc */ import "./presentational-indicator.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { cx } from '@compiled/react'; import { Box } from '@atlaskit/primitives/compiled'; var commonStyles = { common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4" }; var colorBorderMap = { default: "_19it1axi", help: "_19it1axi", inverted: "_19it1ps9", primary: "_19it1axi" }; var backgroundColor = function backgroundColor(isSelected) { if (!isSelected) { return { default: "var(--ds-surface, #FFFFFF)", help: "var(--ds-surface, #FFFFFF)", inverted: "var(--ds-background-neutral-subtle, #00000000)", primary: "var(--ds-surface, #FFFFFF)" }; } return { default: "var(--ds-icon, #292A2E)", help: "var(--ds-icon-discovery, #AF59E1)", inverted: "var(--ds-icon-inverse, #FFFFFF)", primary: "var(--ds-icon-brand, #1868DB)" }; }; export var PresentationalIndicator = function PresentationalIndicator(_ref) { var appearance = _ref.appearance, isSelected = _ref.isSelected, testId = _ref.testId; return /*#__PURE__*/React.createElement(Box, { testId: testId // here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon') , style: { backgroundColor: backgroundColor(isSelected)[appearance] }, xcss: cx(commonStyles.common, colorBorderMap[appearance]) }); };