UNPKG

wix-style-react

Version:
22 lines 1.1 kB
import React from 'react'; import { Confirm, StatusAlertFilled } from '@wix/wix-ui-icons-common'; import { FormFieldErrorSmall } from '@wix/wix-ui-icons-common/system'; import { Type, StepType } from '../constants'; import { st, classes } from './StepMarker.st.css'; const StepMarker = ({ number, active, type, styleType, hovered, disabled, className, ...otherProps }) => { const renderCompleted = () => React.createElement(Confirm, null); const renderNumber = () => `${number}${styleType === Type.Text ? '.' : ''}`; const renderError = () => styleType === Type.Text ? (React.createElement(StatusAlertFilled, null)) : (React.createElement(FormFieldErrorSmall, { size: "12px" })); return (React.createElement("div", { className: st(classes.root, { type, styleType, selected: active, hovered, }, className) }, type === StepType.Error ? renderError() : type === StepType.Completed ? renderCompleted() : renderNumber())); }; export default StepMarker; //# sourceMappingURL=StepMarker.js.map