ar-design
Version:
AR Design is a (react | nextjs) ui library.
18 lines (17 loc) • 839 B
JavaScript
"use client";
import React from "react";
import "../../../assets/css/components/data-display/chip/chip.css";
import Utils from "../../../libs/infrastructure/shared/Utils";
const Chip = ({ variant = "outlined", color = "light", customColor, border = { radius: "sm" }, text, icon, }) => {
let _chipClassName = ["ar-chip"];
_chipClassName.push(...Utils.GetClassName(variant, undefined, color, border, undefined, undefined, undefined));
return (React.createElement("div", { className: _chipClassName.map((c) => c).join(" "), ...(customColor && {
style: {
backgroundColor: customColor,
color: "var(--black)",
},
}) },
icon?.element && React.createElement("span", null, icon?.element),
React.createElement("span", null, text)));
};
export default Chip;