/** @jsxRuntime classic */ /** @jsx jsx */ import React, { Fragment } from 'react'; import { css, jsx, useTheme } from '@emotion/react'; import { BnIcon } from '../icons_v2'; import { dividerCss, stepCss, stepContainerCss } from './style'; export const Steps = ({ arr, activeStep, handlePrevious, }: { arr: any[]; activeStep: number; handlePrevious: (val: number) => void; }) => { return (
{arr.map((step, index) => { if (index === 0) { return ( ); } else { return ( ); } })}
); }; interface IStepProps { isActive: boolean; index: number; label: string; passed: boolean; handleClick: (val: number) => void; } const Step = ({ isActive, index, label, passed, handleClick }: IStepProps) => { const colors = useTheme(); return (
{ if (passed) { handleClick(index); } }} css={stepCss(colors, isActive, passed)} >
{passed ? : index + 1}
{label}
); }; const Divider = () => { const colors = useTheme(); return
; };