UNPKG

@crossed/demo

Version:

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

58 lines (57 loc) 3.15 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var simple_native_exports = {}; __export(simple_native_exports, { CreateListSimpleNativeDemo: () => CreateListSimpleNativeDemo }); module.exports = __toCommonJS(simple_native_exports); var import_jsx_runtime = require("react/jsx-runtime"); var import_primitive = require("@crossed/primitive"); var import_styled = require("@crossed/styled"); var import_ui = require("@crossed/ui"); var import_react_native = require("react-native"); const List = (0, import_primitive.createList)({ Root: (0, import_styled.styled)(import_react_native.View, { className: ["border border-neutral-800 rounded-lg"] }), Item: (0, import_styled.styled)(import_react_native.View, { className: ["py-2 px-3"] }), SubTitle: (0, import_styled.styled)(import_react_native.Text, { className: ["text-neutral-500 text-sm"] }), Title: (0, import_styled.styled)(import_react_native.Text, { className: ["text-white text-base font-semibold"] }), Divider: (0, import_styled.styled)(import_react_native.View, { className: ["border-t border-neutral-800"] }), Label: (0, import_styled.styled)(import_react_native.Text, { className: ["text-white text-base font-bold"] }) }); const CreateListSimpleNativeDemo = () => { return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.YBox, { space: "md", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(List, { children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(List.Item, { children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.Title, { children: "Number 1" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.SubTitle, { children: "Description Number 1" }) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(List.Item, { children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.Title, { children: "Number 2" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.SubTitle, { children: "Description 2" }) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(List.Item, { children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.Title, { children: "Number 3" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List.SubTitle, { children: "Number 3 have description" }) ] }) ] }) }); }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { CreateListSimpleNativeDemo }); //# sourceMappingURL=simple.native.js.map