UNPKG

@uiw/react-native-doc

Version:
2 lines 14.9 kB
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1948],{25380:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25380,e.exports=t},53666:(e,t,i)=>{"use strict";i.d(t,{r:()=>c});var n,a=i(94599);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(this,arguments)}function s(e,t){let{title:i,titleId:s,...c}=e;return a.createElement("svg",r({className:"github",width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":s},c),i?a.createElement("title",{id:s},i):null,n||(n=a.createElement("path",{d:"M10 0C4.475 0 0 4.475 0 10a9.994 9.994 0 006.838 9.488c.5.087.687-.213.687-.476 0-.237-.013-1.024-.013-1.862-2.512.463-3.162-.612-3.362-1.175-.113-.287-.6-1.175-1.025-1.412-.35-.188-.85-.65-.013-.663.788-.013 1.35.725 1.538 1.025.9 1.512 2.337 1.087 2.912.825.088-.65.35-1.088.638-1.338-2.225-.25-4.55-1.112-4.55-4.937 0-1.088.387-1.987 1.025-2.688-.1-.25-.45-1.274.1-2.65 0 0 .837-.262 2.75 1.026a9.28 9.28 0 012.5-.338c.85 0 1.7.112 2.5.337 1.912-1.3 2.75-1.024 2.75-1.024.55 1.375.2 2.4.1 2.65.637.7 1.025 1.587 1.025 2.687 0 3.838-2.337 4.688-4.562 4.938.362.312.675.912.675 1.85 0 1.337-.013 2.412-.013 2.75 0 .262.188.574.688.474A10.016 10.016 0 0020 10c0-5.525-4.475-10-10-10z"})))}const c=a.forwardRef(s);i.p},25746:(e,t,i)=>{"use strict";i.d(t,{r:()=>c});var n,a=i(94599);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(this,arguments)}function s(e,t){let{title:i,titleId:s,...c}=e;return a.createElement("svg",r({width:"256px",height:"256px",viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":s},c),i?a.createElement("title",{id:s},i):null,n||(n=a.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M84.4999999,25 L133,60.1408731 L114.474648,117 L54.5253515,117 L36,60.1408731 L84.4999999,25 Z M84.4999999,231 L36,195.859127 L54.5253515,139 L114.474648,139 L133,195.859127 L84.4999999,231 Z M220,158.475503 L163.141427,177 L128,128.499472 L163.139977,80 L219.999104,98.5262065 L220,158.475503 Z",id:"Shape",fill:"#4A4A4A",fillRule:"nonzero"}))))}const c=a.forwardRef(s);i.p},67903:(e,t,i)=>{"use strict";i.d(t,{Z:()=>d});const n={warpper:"index_warpper__nTxI0",inner:"index_inner__9mZFw",icons:"index_icons__N9xD3",nav:"index_nav__u5cFC",badges:"index_badges__Oa-js"};var a,r=i(25746),s=i(53666),c=i(94599);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}function l(e,t){let{title:i,titleId:n,...r}=e;return c.createElement("svg",o({viewBox:"0 0 1024 1024",width:20,height:20,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":n},r),i?c.createElement("title",{id:n},i):null,a||(a=c.createElement("path",{d:"M512 1024C229.2224 1024 0 794.7776 0 512S229.2224 0 512 0s512 229.2224 512 512-229.2224 512-512 512z m259.1488-568.8832H480.4096a25.2928 25.2928 0 0 0-25.2928 25.2928l-0.0256 63.2064c0 13.952 11.3152 25.2928 25.2672 25.2928h177.024c13.9776 0 25.2928 11.3152 25.2928 25.2672v12.6464a75.8528 75.8528 0 0 1-75.8528 75.8528H366.592a25.2928 25.2928 0 0 1-25.2672-25.2928v-240.1792a75.8528 75.8528 0 0 1 75.8272-75.8528h353.9456a25.2928 25.2928 0 0 0 25.2672-25.2928l0.0768-63.2064a25.2928 25.2928 0 0 0-25.2672-25.2928H417.152a189.6192 189.6192 0 0 0-189.6192 189.6448v353.9456c0 13.9776 11.3152 25.2928 25.2928 25.2928h372.9408a170.6496 170.6496 0 0 0 170.6496-170.6496v-145.408a25.2928 25.2928 0 0 0-25.2928-25.2672z",fill:"#C71D23"})))}const h=c.forwardRef(l);i.p;var p=i(51962);const u=[{title:"Product",childrens:[{href:"https://github.com/uiwjs/react-native-uiw",title:"React Native UIW"},{href:"https://github.com/uiwjs/react-native-template",title:"React Native Template"},{href:"https://github.com/uiwjs/react-native-alipay",title:"React Native Alipay"},{href:"https://github.com/uiwjs/react-native-amap-geolocation",title:"React Native AMap Geolocation"},{href:"https://uiw.gitee.io/react-native-uiw/",title:"\u56fd\u5185\u955c\u50cf\u7ad9\u70b9 \ud83c\udde8\ud83c\uddf3"}]},{title:"\u76f8\u5173\u8d44\u6e90",childrens:[{href:"https://uiwjs.github.io/icons",title:"Preview Icons"},{href:"https://github.com/react-native-community/upgrade-helper",title:"React Native Upgrade Helper"},{href:"https://github.com/jondot/awesome-react-native",title:"Awesome React Native"},{href:"https://github.com/uiwjs/uiw",title:"UIW on GitHub"}]},{title:"\u76f8\u5173\u7ec4\u4ef6",childrens:[{href:"https://github.com/react-navigation/react-navigation",title:"React Navigation"},{href:"https://github.com/rematch/rematch",title:"Rematch.js"}]},{title:"\u5176\u5b83\u8d44\u6599",childrens:[{href:"https://github.com/facebook/react",title:"React"},{href:"https://github.com/facebook/react-native",title:"React Native"},{href:"https://github.com/jaywcjlove/mocker-api",title:"Mocker API"},{href:"https://www.pgyer.com/",title:"App \u5e94\u7528\u5185\u6d4b\u5206\u53d1\u6258\u7ba1"}]},{title:"\u5b66\u4e60\u8d44\u6599",childrens:[{href:"https://www.reactnative.express/",title:"React Native Express"},{href:"https://www.react.express/",title:"React Express"},{href:"https://jskatas.org/",title:"JavaScript Katas"},{href:"https://www.typescriptlang.org/",title:"TypeScript"},{href:"https://es6.ruanyifeng.com/",title:"ES6 \u5165\u95e8\u6559\u7a0b"}]}];function d(e){const{placement:t}=e;return(0,p.jsx)("footer",{className:n.warpper,children:(0,p.jsxs)("div",{className:n.inner,style:{..."left"===t?{margin:"inherit"}:{}},children:[(0,p.jsx)("div",{className:n.nav,children:u.map(((e,t)=>(0,p.jsx)("nav",{children:(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{children:e.title}),(0,p.jsx)("ul",{children:e.childrens.map(((e,t)=>(0,p.jsx)("li",{children:(0,p.jsx)("a",{href:e.href,target:"__blank",children:e.title})},t)))})]})},t)))}),(0,p.jsxs)("section",{children:[(0,p.jsxs)("div",{className:n.icons,children:[(0,p.jsx)("a",{href:"https://uiwjs.github.io/react-native-uiw/",target:"__blank",children:(0,p.jsx)(r.r,{height:"27",width:"27"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw",target:"__blank",children:(0,p.jsx)(s.r,{})}),(0,p.jsx)("a",{href:"https://gitee.com/uiw/react-native-uiw",target:"__blank",children:(0,p.jsx)(h,{})})]}),(0,p.jsxs)("div",{className:n.icons,children:[(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw/issues",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/issues/uiwjs/react-native-uiw.svg",alt:"Github Issues"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw/network",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/forks/uiwjs/react-native-uiw.svg",alt:"Github Forks"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw/stargazers",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/stars/uiwjs/react-native-uiw.svg",alt:"Github Stars"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw/releases",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/github/release/uiwjs/react-native-uiw.svg",alt:"Github Release"})}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/react-native-uiw",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/dub/l/vibe-d.svg",alt:"License MIT"})}),(0,p.jsx)("a",{href:"https://www.npmjs.com/package/@uiw/react-native",target:"__blank",children:(0,p.jsx)("img",{src:"https://img.shields.io/npm/v/@uiw/react-native.svg",alt:"npm"})})]}),(0,p.jsxs)("p",{children:["Copyright \xa9 2021"," ",(0,p.jsx)("a",{href:"https://github.com/uiwjs",target:"__blank",children:"uiwjs"}),". All rights reserved."]})]})]})})}},76427:(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var n=i(17186),a=i(41925),r=i(4565),s=i(26706),c=i(47756),o=i(18736),l=i(94599),h=i(51962);function p(e){const{path:t}=e,i=/^http/.test(t||"")?t:"https://github.com/uiwjs/react-native-uiw/edit/master/".concat(null===t||void 0===t?void 0:t.replace(/^\//,""));return(0,h.jsxs)("div",{style:{paddingBlock:20},children:[t&&i&&(0,h.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",style:{color:"#333"},children:"\u5728Github\u4e0a\u7f16\u8f91\u672c\u9875\uff01"}),(0,h.jsx)(s.iz,{type:"vertical"}),(0,h.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/react-native-uiw/issues",style:{color:"#333"},children:"\u63d0\u4ea4bug"})]})}var u,d,g=i(67903);const w=r.ZP.div(u||(u=(0,n.Z)(["\n width: 100%;\n height: 100%;\n overflow: auto;\n .w-rcpl-preview {\n white-space: normal;\n }\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n"]))),m=(0,r.ZP)(a.Z)(d||(d=(0,n.Z)(["\n padding: 50px 50px 120px 50px;\n /* max-width: 1024px; */\n width: 1024px;\n"]))),v=(e,t,i)=>{if(Reflect.has(e,t)){return"true"===Reflect.get(e,t)}return i},b=e=>{let{path:t,...i}=e;const n=o.ZP.Preview,a=o.ZP.Code,r=o.ZP.Toolbar,u=(0,l.useRef)(null);return(0,h.jsxs)(w,{ref:u,children:[(0,h.jsx)(m,{...i,disableCopy:!0,source:i.source,rehypeRewrite:(e,t,i)=>{if("element"===e.type&&i&&"root"===i.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){const t=e.children&&e.children[0];t&&t.properties&&"true"===t.properties.ariaHidden&&(t.children=[])}},components:{code:e=>{var t;let{inline:s,node:l,...p}=e;const{"data-meta":u,...d}=p;if(s||!(0,c.pN)(u))return(0,h.jsx)("code",{...p});const g=null===(t=l.position)||void 0===t?void 0:t.start.line,w=(0,c.Mx)(u)||String(g),m=i.components["".concat(w)];if(w&&"function"===typeof m){const e=i.data[w].value||"",t=(0,c.aE)(u);return(0,h.jsxs)(o.ZP,{disableCheckered:v(t,"disableCheckered",!0),bordered:v(t,"bordered",!0),children:[(0,h.jsx)(n,{children:(0,h.jsx)(m,{})}),(0,h.jsx)(r,{text:e,copied:v(t,"copied",!0),children:t.title||"\u793a\u4f8b"}),(0,h.jsx)(a,{children:(0,h.jsx)("code",{...d})})]})}return(0,h.jsx)("code",{...d})}}}),(0,h.jsx)(g.Z,{}),(0,h.jsx)(p,{path:t}),(0,h.jsx)(s.kF,{speed:500,children:e=>{let{percent:t,scrollToTop:i}=e;return(0,h.jsx)(s.Cd,{width:50,onClick:()=>i(),format:()=>(0,h.jsx)(s.JO,{type:"arrow-up"}),percent:t})}})]})}},70475:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Component:()=>s});var n=i(76427);const a={components:{},data:{},source:'<p align="center">\n <a href="https://uiwjs.github.io">\n <img width="150" src="https://raw.githubusercontent.com/uiwjs/uiw/92f189f53312f1177466f48991736f95f86da0a6/src/assets/logo-README.svg?sanitize=true">\n </a>\n</p>\n<p align="center">\n <a href="https://github.com/uiwjs/react-native-uiw/issues">\n <img src="https://img.shields.io/github/issues/uiwjs/react-native-uiw.svg">\n </a>\n <a href="https://github.com/uiwjs/react-native-uiw/network">\n <img src="https://img.shields.io/github/forks/uiwjs/react-native-uiw.svg">\n </a>\n <a href="https://github.com/uiwjs/react-native-uiw/stargazers">\n <img src="https://img.shields.io/github/stars/uiwjs/react-native-uiw.svg">\n </a>\n <br>\n <a href="https://github.com/uiwjs/react-native-uiw/releases">\n <img src="https://img.shields.io/github/release/uiwjs/react-native-uiw.svg">\n </a>\n <a href="https://github.com/uiwjs/react-native-uiw">\n <img src="https://img.shields.io/dub/l/vibe-d.svg">\n </a>\n <a href="https://www.npmjs.com/package/@uiw/react-native">\n <img src="https://img.shields.io/npm/v/@uiw/react-native.svg">\n </a>\n</p>\n\nReact Native UIW\n---\n\nA UI component library based on React Native (Android & iOS).\n\n[\u5feb\u901f\u4e0a\u624b](https://uimjs.github.io/#/docs/getting-started) | [\u53c2\u4e0e\u7ec4\u4ef6\u5f00\u53d1](https://uimjs.github.io/#/docs/development/components) | [\u53c2\u4e0e\u6587\u6863/\u7f51\u7ad9\u7f16\u8f91\u5f00\u53d1](https://uimjs.github.io/#/docs/development/document) | [\u7ec4\u4ef6\u5e93](https://uimjs.github.io/#/components/about)\n\n\u60a8\u53ef\u4ee5\u4f7f\u7528\u6211\u4eec\u5236\u5b9a\u7684\u6a21\u7248([`@uiw/react-native-template`](https://github.com/uiwjs/react-native-template))\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff1a\n\n\x3c!--rehype:style=background-color: rgb(118 247 149);--\x3e\n```shell\n# \u6b64\u6a21\u677f\u9ed8\u8ba4\u96c6\u6210\u4e86\u4e00\u4e9b\u5fc5\u7528\u7684\u4f9d\u8d56\uff0c\u5982\u8def\u7531\uff0c\u7ec4\u4ef6\u5e93\u7b49\nnpx react-native init AwesomeProject --template @uiw/react-native-template\n```\n\n## Install\n```bash\nyarn add @uiw/react-native react-native-svg@13.9.0 react-native-root-siblings@4.1.1 react-native-gesture-handler@2.8.0\n```\n\n## Theme Configuration\n \u9879\u76eeApp.tsx\u6587\u4ef6\u914d\u7f6e\n\n```jsx\n//...\u5176\u4ed6import\nimport { ThemeProvider } from \'@uiw/react-native\';\n\nconst App = () => {\n return <ThemeProvider>{/** \u5176\u4ed6Provider */}</ThemeProvider>;\n};\n\nexport default App;\n```\n\n## Basic Usage\n\n```jsx\nimport React from \'react\';\nimport { View } from \'react-native\';\nimport { Icon } from \'@uiw/react-native\'\n\nexport default class Demo extends React.Component {\n render() {\n return (\n <View>\n <Icon name=\'apple\' size={46} color=\'#50CB42\' />\n </View>\n )\n }\n}\n```\n\n## Other\n\n- [@uiw/react-native-alipay](https://github.com/uiwjs/react-native-alipay)\n- [@uiw/react-native-amap-geolocation](https://github.com/uiwjs/react-native-amap-geolocation)\n\n## Development\n\n```bash\n# Install current dependencies, and dependencies in sub-packages\nyarn install\nyarn run build # Compile package\n```\n\nReal-time monitoring of package and document website local preview\n\n```bash\n# Step 1\nyarn run lib:watch # Compile and output JS file\n# Step 2\nyarn run lib:watch:type # Output type file d.ts\n# Step 3\nyarn run start # Run the preview document website locally\n```\n\n## \u6587\u6863\u672c\u5730\u9884\u89c8\n\n**\u7b2c\u4e00\u6b65\u5b89\u88c5\u6587\u6863\u5305\u548c\u9884\u89c8\u5de5\u5177**\n\n```bash\n npm install @uiw/react-native-doc @kkt/doc -D # yarn add @uiw/react-native-doc @kkt/doc -D\n```\n\n**\u7b2c\u4e8c\u6b65\u914d\u7f6e\u547d\u4ee4**\n\n\u5728`package.json`\u6587\u4ef6\u4e2d\u914d\u7f6e\u547d\u4ee4\n\n```json\n // ... \n "scripts":{\n "doc":"kktd @uiw/react-native-doc/doc/build"\n }\n```\n\n\n### License\n\nLicensed under the MIT License.\n',headings:[],headingsList:[]};var r=i(51962);const s=()=>(0,r.jsx)(n.Z,{...a,path:"/packages/core/README.md"})}}]); //# sourceMappingURL=1948.dd3c03b2.chunk.js.map