sparrow ui
vious version of pnpm code
? Powerful theme customization in every detail.
? Super adaptive ability
IE / Edge |
Firefox |
Chrome |
Safari |
Electron |
---|---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
npm i @sparrowend/ui
yarn add @sparrowend/ui
pnpm add @sparrowend/ui
jsx
import { Button } from '@sparrowend/ui';
const App = () => (
<>
<Button type="primary">PRESS ME</Button>
</>
);
And import style manually:
import '@sparrowend/ui/dist/spui.css';
// or
// import '@sparrowend/ui/es/button/style';
html
<html>
<link href='dist/spui.css'></link>
<script src="dist/spui.js"></script>
or
<script type="module">
import { Message } from 'dist/spui-es.js';
Message.error('the end');
</script>
<sp-button>click me</sp-button>
</html>
import map
<html>
<link href='dist/spui.css'></link>
<script type="importmap">
{
"imports": {
"sparrow-ui": "dist/spui-es.js"
}
}
</script>
<script type="module">
import { Message } from 'sparrow-ui';
Message.error('sucessful');
</script>
</html>
node(compile ---> any)
<!--layout.art-->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{block 'title'}}My Site{{/block}}</title>
<link href='dist/spui.css'></link>
<script src="dist/spui.js"></script>
{{block 'head'}}
<link rel="stylesheet" href="main.css">
{{/block}}
</head>
<body>
{{block 'content'}}{{/block}}
</body>
</html>
{{if user}}
<h2>{{user.name}}</h2>
<sp-button>Thanks!</sp-button>
{{/if}}
Use Gitpod, a free online dev environment for GitHub.
Or clone locally:
$ git clone [email protected]:lianglei-git/sparrow-ui.git
$ cd sparrow-ui
$ npm install
$ npm run start
My welcome all contributions. Please contact me at [email protected]