UNPKG

@crossed/demo

Version:

A universal & performant styling library for React Native, Next.js & React

35 lines (34 loc) 1.13 kB
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" }, ":hover": { className: ["bg-neutral-700"] }, ":focus": { className: ["!outline-1", "!outline-blue-500"] }, ":active": { className: ["bg-neutral-900"] }, ":disabled": { className: ["opacity-50"] } }); const ButtonStateNativeDemo = () => { return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 justify-center p-5", children: [ /* @__PURE__ */ jsx(Button, { children: "Hover or Press" }), /* @__PURE__ */ jsx(Button, { disabled: true, children: "Disabled" }), /* @__PURE__ */ jsx(Button, { states: { isHover: true }, children: "hover" }), /* @__PURE__ */ jsx(Button, { states: { isFocus: true }, children: "focus" }), /* @__PURE__ */ jsx(Button, { states: { isActive: true }, children: "active" }) ] }); }; export { ButtonStateNativeDemo }; //# sourceMappingURL=State.native.js.map