@spark-ui/components
Version:
Spark (Leboncoin design system) components.
52 lines (49 loc) • 981 B
JavaScript
import {
Button
} from "./chunk-USSL4UZ5.mjs";
// src/icon-button/IconButton.styles.tsx
import { makeVariants } from "@spark-ui/internal-utils";
import { cva } from "class-variance-authority";
var iconButtonStyles = cva(["pl-0 pr-0"], {
variants: {
/**
* Sets the size of the icon.
*/
size: makeVariants({
sm: ["text-body-1"],
md: ["text-body-1"],
lg: ["text-display-3"]
})
}
});
// src/icon-button/IconButton.tsx
import { jsx } from "react/jsx-runtime";
var IconButton = ({
design = "filled",
disabled = false,
intent = "main",
shape = "rounded",
size = "md",
className,
ref,
...others
}) => {
return /* @__PURE__ */ jsx(
Button,
{
ref,
className: iconButtonStyles({ size, className }),
design,
disabled,
intent,
shape,
size,
...others
}
);
};
IconButton.displayName = "IconButton";
export {
IconButton
};
//# sourceMappingURL=chunk-QLOIAU3C.mjs.map