import * as React from "react";
import { Slot } from "radix-ui";
function Button({ asChild, children, leftElement, rightElement, ...props }) {
	const Comp = asChild ? Slot.Root : "button";
	return (
		<Comp {...props}>
			{leftElement}
			<Slot.Slottable>{children}</Slottable>
			{rightElement}
		</Comp>
	);
}