UNPKG

@rainliu/y-ui

Version:

# @rainliu/y-ui > 一款基于 React 的现代化 UI 组件库,提供优雅、简洁且易于使用的组件,助力快速开发高质量的 Web 应用。

2 lines 829 B
import{useState as d}from"react";import{jsx as s}from"react/jsx-runtime";var r=({value:o,onChange:t,placeholder:e})=>s("input",{className:"y-input",value:o,onChange:a=>t?.(a.target.value),placeholder:e,"data-testid":"custom-input"});import{jsx as c}from"react/jsx-runtime";var u=({children:o,onClick:t,type:e="default",disabled:a=!1,className:n=""})=>{let l=`y-button-${e}`,p=n?`${l} ${n}`:l;return c("button",{className:p,onClick:t,disabled:a,type:"button",children:o})};import{jsx as i,jsxs as h}from"react/jsx-runtime";var m=({onSubmit:o})=>{let[t,e]=d("");return h("div",{style:{display:"flex",alignItems:"center"},children:[i(r,{value:t,onChange:e,placeholder:"\u8F93\u5165\u5185\u5BB9"}),i(u,{onClick:()=>{o(t),e("")},type:"primary",children:"\u63D0\u4EA4"})]})},I=m;export{I as default}; //# sourceMappingURL=index.mjs.map