@crossed/demo
Version:
A universal & performant styling library for React Native, Next.js & React
41 lines (40 loc) • 1.04 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { styled } from "@crossed/styled";
import { Pressable } from "react-native";
const Button = styled(Pressable, {
className: ["px-3 py-2", "border border-neutral-700", "bg-neutral-800"],
props: {
role: "button"
},
variants: {
rounded: {
false: {},
true: {
className: ["rounded"]
},
sm: {
className: ["rounded-sm"]
},
md: {
className: ["rounded-md"]
},
lg: {
className: ["rounded-lg"]
}
}
},
defaultVariants: {
rounded: "md"
}
});
const ButtonDefaultVariantsDemo = () => {
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 justify-center", children: [
/* @__PURE__ */ jsx(Button, { children: "Default" }),
/* @__PURE__ */ jsx(Button, { rounded: false, children: "no rounded" }),
/* @__PURE__ */ jsx(Button, { rounded: "lg", children: "rounded-lg" })
] });
};
export {
ButtonDefaultVariantsDemo
};
//# sourceMappingURL=DefaultVariants.js.map