@ozen-ui/kit
Version:
React component library
17 lines (16 loc) • 1.4 kB
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { cn, polymorphicComponentWithRef } from '../../../../utils';
import { Button } from '../../../ButtonNext';
import { STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_COLOR, STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_ICON_RIGHT, STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_TAG, } from './constants';
export var cnStepperVerticalStepButton = cn('StepperVerticalStepButton');
export var StepperVerticalStepButton = polymorphicComponentWithRef(function (inProps, ref) {
var props = useThemeProps({
name: 'StepperVerticalStepButton',
props: inProps,
});
var children = props.children, _a = props.color, color = _a === void 0 ? STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_COLOR : _a, _b = props.iconRight, iconRight = _b === void 0 ? STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_ICON_RIGHT : _b, className = props.className, _c = props.as, as = _c === void 0 ? STEPPER_VERTICAL_STEP_BUTTON_DEFAULT_TAG : _c, other = __rest(props, ["children", "color", "iconRight", "className", "as"]);
return (React.createElement(Button, __assign({}, other, { as: as, ref: ref, size: "2xs", variant: "function", color: color, iconRight: iconRight, className: cnStepperVerticalStepButton('', [className]) }), children));
});
StepperVerticalStepButton.displayName = 'StepperVerticalStepButton';