@6thquake/react-material 中文文档教程

发布于 5年前 浏览 21 项目主页 更新于 3年前

React-Material logo

React-Material

[React](http://facebook.github.io/react/) components that implement [Google's Material Design](https://www.google.com/design/spec/material-design/introduction.html). [![npm package](https://img.shields.io/npm/v/material-ui/next.svg)](http://npm.release.ctripcorp.com/package/react-material) [![npm download](https://img.shields.io/npm/dm/material-ui.svg)](http://npm.release.ctripcorp.com/package/react-material) ![Code style](/static/images/code_style-prettier.svg)

Installation

React-Material 以 npm 包 的形式提供。

稳定通道 (v0.x)

npm install @6thquake/react-material

预发布通道(v1-beta)推荐用于新项目。)

npm install @6thquake/react-material@next

v0.x(http://react-material.fat0.qa.nt .ctripcorp.com/)

// with npm
npm install @6thquake/react-material

// with yarn
yarn add react-material

请注意,@next 只会指向预发布; 要获得最新的稳定版本,请改用 @latest

Supporting React-Material

React-Material 是 MIT 许可的开源项目。 这是一个独立的项目,在这些了不起的支持者的支持下,持续开发成为可能。

您的贡献、捐赠和赞助使我们能够建立一个可持续发展的组织。 他们直接支持办公时间、持续改进、出色的文档和学习材料!

Usage (v1-beta)

这是一个帮助您入门的快速示例,这就是您所需要的

import React from 'react';
import { render } from 'react-dom';
import Button from '@6thquake/react-material/Button';

function App() {
  return (
    <Button variant="raised" color="primary">
      Hello World
    </Button>
  );
}

render(<App />, document.querySelector('#app'));

Should I start with v1-beta?

我们经常会遇到这样的问题:

我应该从 v1-beta 开始吗? Beta 就是 Beta,所以它不是最终产品,我不能保证任何事情。

是的,你应该。

一些用户开始使用 v0.x 的项目,考虑到 v1 的质量和稳定性,他们不应该这样做。 他们只是在为自己创造额外的工作,因为他们将不得不在某个时候过渡。

v1-beta 工作于 2016 年 5 月开始,它解决了 v0 的许多问题。 我们中的许多人已经在生产中毫无问题地使用 v1-beta,解决偶尔发生的重大变化比从 v0.x 升级到 v1 更容易。

React-Material 永远不会成为最终产品,无论是 v0.x、v1 还是任何未来版本,您都无法得到任何保证。 我们将 v1 保持在测试版中,这样我们就可以发布重大更改而不会拖慢我们的速度。

发行说明 始终描述每个版本引入的重大更改。

咬紧牙关,争取 v1-beta。

Questions

对于如何问题和其他非问题, 请使用 StackOverflow 而不是 Github 问题。 有一个名为“material-ui”的 StackOverflow 标签,您可以使用它来标记您的问题。

Examples

您是否正在寻找一个示例项目来开始? 我们主持一些

Documentation

查看我们的文档网站

Contributing

我们非常感谢您做出的任何贡献。 :)

Changelog

最近更新了吗? 请阅读变更日志

Roadmap

可以在 ROADMAP.md 文件中找到未来计划和高优先级功能和增强功能。

Thanks

感谢 React-Material 提供基础设施,让我们能够 在此基础上拓展,规范规范,路径清晰。

感谢 BrowserStack 提供允许我们在真实浏览器中进行测试的基础设施。

License

该项目根据以下条款获得许可 麻省理工学院许可证

React-Material logo

React-Material

[React](http://facebook.github.io/react/) components that implement [Google's Material Design](https://www.google.com/design/spec/material-design/introduction.html). [![npm package](https://img.shields.io/npm/v/material-ui/next.svg)](http://npm.release.ctripcorp.com/package/react-material) [![npm download](https://img.shields.io/npm/dm/material-ui.svg)](http://npm.release.ctripcorp.com/package/react-material) ![Code style](/static/images/code_style-prettier.svg)

Installation

React-Material is available as an npm package.

Stable channel (v0.x)

npm install @6thquake/react-material

Pre-release channel (v1-beta) (Recommended for new projects.)

npm install @6thquake/react-material@next

v0.x(http://react-material.fat0.qa.nt.ctripcorp.com/)

// with npm
npm install @6thquake/react-material

// with yarn
yarn add react-material

Please note that @next will only point to pre-releases; to get the latest stable release use @latest instead.

Supporting React-Material

React-Material is an MIT-licensed open source project. It's an independent project with ongoing development made possible thanks to the support of these awesome backers.

Your contributions, donations, and sponsorship allow us to build a sustainable organization. They directly support office hours, continued enhancements, great documentation and learning materials!

Usage (v1-beta)

Here is a quick example to get you started, it's all you need:

import React from 'react';
import { render&nbsp;} from 'react-dom';
import Button from '@6thquake/react-material/Button';

function App() {
  return (
    <Button variant="raised" color="primary">
      Hello World
    </Button>
  );
}

render(<App />, document.querySelector('#app'));

Should I start with v1-beta?

We often get this question:

Should I start with v1-beta? Beta is beta, so it's not a final product and I'm not guaranteed anything.

Yes, you should.

Some users are starting projects with v0.x which given the quality and stability of v1 they shouldn't be. They are just creating extra work for themselves as they will have to transition at some point.

The v1-beta effort started in May 2016, and it resolves many of the issues with v0. Many of us are already using v1-beta in production with no problems, and resolving the occasional breaking change is less hassle than upgrading from v0.x to v1 would be.

React-Material will never be a final product, you will never be guaranteed anything whether with v0.x, v1, or any future release. We are keeping v1 in beta so we can release breaking changes without having them slow us down.

The release notes always describe the breaking changes introduced with each release.

Bite the bullet and go for v1-beta.

Questions

For how-to questions and other non-issues, please use StackOverflow instead of Github issues. There is a StackOverflow tag called "material-ui" that you can use to tag your questions.

Examples

Are you looking for an example project to get started? We host some.

Documentation

Check out our documentation website.

Contributing

We'd greatly appreciate any contribution you make. :)

Changelog

Recently Updated? Please read the changelog.

Roadmap

The future plans and high priority features and enhancements can be found in the ROADMAP.md file.

Thanks

Thank you to React-Material for providing the infrastructure that allows us to expand based on it, with standard specifications, and clear path.

Thank you to BrowserStack for providing the infrastructure that allows us to test in real browsers.

License

This project is licensed under the terms of the MIT license.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文