@crossed/demo
Version:
A universal & performant styling library for React Native, Next.js & React
29 lines (28 loc) • 829 B
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { styled } from "@crossed/styled";
import { Pressable, TextInput } from "react-native";
const Button = styled(Pressable, {
"className": ["px-3 py-2", "border border-neutral-700", "bg-neutral-800"],
"props": {
role: "button"
},
":hover": {
className: ["bg-neutral-700"]
},
":active": {
className: ["bg-neutral-900"]
}
});
const InputStyledFrom = styled(TextInput, {
extends: Button.styles
});
const ButtonExtendsDemo = () => {
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 justify-center p-5", children: [
/* @__PURE__ */ jsx(Button, { children: "Hover or Press" }),
/* @__PURE__ */ jsx(InputStyledFrom, { placeholder: "Placeholder" })
] });
};
export {
ButtonExtendsDemo
};
//# sourceMappingURL=Extends.js.map