@ozen-ui/kit
Version:
React component library
21 lines (20 loc) • 1.29 kB
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { cn, polymorphicComponentWithRef } from '../../../../utils';
import { Stack } from '../../../Stack';
import { useStepperVerticalStepContext } from '../StepperVerticalStep';
import { STEPPER_VERTICAL_INDICATOR_DEFAULT_TAG } from './constants';
export var cnStepperVerticalIndicator = cn('StepperVerticalIndicator');
export var StepperVerticalIndicator = polymorphicComponentWithRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'StepperVerticalIndicator',
});
var children = props.children, className = props.className, as = props.as, other = __rest(props, ["children", "className", "as"]);
var variant = useStepperVerticalStepContext().variant;
var Tag = as !== null && as !== void 0 ? as : STEPPER_VERTICAL_INDICATOR_DEFAULT_TAG;
return (React.createElement(Tag, __assign({}, other, { ref: ref, className: cnStepperVerticalIndicator({ variant: variant }, [className]) }),
React.createElement(Stack, { className: cnStepperVerticalIndicator('Content'), align: "center", justify: "center" }, children)));
});
StepperVerticalIndicator.displayName = 'StepperVerticalIndicator';