@_nu/cli
Version:
🛠️ Standard Tooling for nu-system component development
74 lines (55 loc) • 2.78 kB
Markdown
<% var componentNameC=componentName.charAt(0).toUpperCase() + componentName.slice(1); %>
| npm package| npm downloads| jsdelivr | github |
| --------------- | ------------------------------ | ------ | ----------------------- |
| [![npm package][npm-badge]][npm-url] | [![npm downloads][npm-downloads]][npm-url] | [![jsdelivr][jsdelivr-badge]][jsdelivr-url] | [![github][git-badge]][git-url] |
[]: https://img.shields.io/npm/v/@_nu/react-<%= componentName %>.svg
[]: https://www.npmjs.org/package/@_nu/react-<%= componentName %>
[]: https://img.shields.io/npm/dw/@_nu/react-<%= componentName %>
[]: https://github.com/nu-system/react-<%= componentName %>
[]: https://img.shields.io/github/stars/nu-system/react-<%= componentName %>.svg?style=social
[]: https://data.jsdelivr.com/v1/package/npm/@_nu/react-<%= componentName %>/badge
[]: https://www.jsdelivr.com/package/npm/@_nu/react-<%= componentName %>
English | [简体中文](./lang/zh.md)
```
yarn add @_nu/react-<%= componentName %> @_nu/css-<%= componentName %>
```
- [@\_nu/react-<%= componentName %>](https://nu-system.github.io/react/<%= componentName %>/): Login only
- [@\_nu/css-<%= componentName %>](https://nu-system.github.io/css/<%= componentName %>/): UI Just
```JSX
/* @components/<%= componentNameC %>/index.js */
import <%= componentNameC %> from "@_nu/react-<%= componentName %>";
// core style
import "@_nu/css-<%= componentName %>";
// skin of default
import "@_nu/css-<%= componentName %>/css/skins/default.css";
// custome style
// import './style.css';
// base className of <%= componentNameC %>
<%= componentNameC %>.defaultProps.classNameBase = "";
export default <%= componentNameC %>;
```
```JSX
import <%= componentNameC %> from "./components/<%= componentNameC %>";
const Page=()=>{
return (
<div>
<<%= componentNameC %>>Hello world!</<%= componentNameC %>>
</div>
);
};
export default Page;
```
| Prop | type | Default | Function |
| :--------------- | :------------------------------: | :------: | :-----------------------: |
| children | string &
| className | string &
| classNameDefault | string &
- [nu-system](https://nu-system.github.io/)
- [@\_nu/css-<%= componentName %>](https://nu-system.github.io/css/<%= componentName %>/)
- [@\_nu/react-<%= componentName %>](https://nu-system.github.io/react/<%= componentName %>/)