diff --git a/docs/src/pages/components/about-the-lab/about-the-lab-zh.md b/docs/src/pages/components/about-the-lab/about-the-lab-zh.md index e3ce29de3298ac..246e89956f5aca 100644 --- a/docs/src/pages/components/about-the-lab/about-the-lab-zh.md +++ b/docs/src/pages/components/about-the-lab/about-the-lab-zh.md @@ -2,7 +2,7 @@
此依赖包包含了一些还在开发中的组件,它们还不能移到 core(核心)库中。
-核心库(core)和实验室(lab)之间的主要差别就是组件是如何版本化的 拥有独立的实验室版本,我们就可以在必要的时候发布一些会影响原本代码的改动,并且核心库遵循 [slower-moving policy](https://material-ui.com/versions/#release-frequency) +核心库(core)和实验室(lab)最主要的差别在于对组件进行版本管理的方式。 拥有独立的实验室版本,我们就可以在必要的时候发布一些会影响原本代码的改动,并且核心库遵循 [slower-moving policy](https://material-ui.com/versions/#release-frequency) 程序员在使用和测试组件后向项目报漏洞,维护者就知道更多关于组件的缺点:如缺少功能,能不能访问的问题、漏洞,API设计等等的问题 一个组建被使用的时间越久,新问题被发现以及因此需要引入重大更改的可能性就越少。 diff --git a/docs/src/pages/components/alert/alert-zh.md b/docs/src/pages/components/alert/alert-zh.md index 712b2dce6d8171..6edef18777135b 100644 --- a/docs/src/pages/components/alert/alert-zh.md +++ b/docs/src/pages/components/alert/alert-zh.md @@ -35,7 +35,7 @@ components: Alert, AlertTitle {{"demo": "pages/components/alert/TransitionAlerts.js"}} -## Icons 图标 +## 图标 `icon`是指可以在「提醒」组件的开始的地方加一个图标。 以此来改变不同程度「提醒」的默认图标。 @@ -45,7 +45,7 @@ components: Alert, AlertTitle {{"demo": "pages/components/alert/IconAlerts.js"}} -## 变种(Variants) +## 变种 还可以实现「边框」和「填充」这两种变体。 @@ -57,7 +57,7 @@ components: Alert, AlertTitle {{"demo": "pages/components/alert/FilledAlerts.js"}} -## Toast(提示) +## 提示 你可以使用「消息条」来显示[ 带确认按钮的Toast 提示](/components/snackbars/#customized-snackbars) 。 diff --git a/docs/src/pages/components/autocomplete/autocomplete-aa.md b/docs/src/pages/components/autocomplete/autocomplete-aa.md index e84a20dfd60ff9..5ac3eea3a200eb 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-aa.md +++ b/docs/src/pages/components/autocomplete/autocomplete-aa.md @@ -106,61 +106,68 @@ crwdns130772:0crwdne130772:0 crwdns130774:0crwdne130774:0 +### crwdns131036:0crwdne131036:0 + +crwdns131038:0crwdne131038:0 + +crwdns131040:0crwdne131040:0 + ## crwdns106429:0crwdne106429:0 -crwdns130776:0crwdne130776:0 crwdns130778:0crwdne130778:0 +crwdns131042:0crwdne131042:0 crwdns131044:0crwdne131044:0 -crwdns130780:0crwdne130780:0 +crwdns131046:0crwdne131046:0 ## crwdns106437:0crwdne106437:0 -crwdns130782:0crwdne130782:0 +crwdns131048:0crwdne131048:0 -crwdns130784:0crwdne130784:0 +crwdns131050:0crwdne131050:0 -crwdns130786:0crwdne130786:0 +crwdns131052:0crwdne131052:0 ## crwdns106445:0crwdne106445:0 -crwdns130788:0crwdne130788:0 +crwdns131054:0crwdne131054:0 -crwdns130790:0crwdne130790:0 +crwdns131056:0crwdne131056:0 ## crwdns106451:0crwdne106451:0 -crwdns130792:0crwdne130792:0 crwdns130794:0crwdne130794:0 +crwdns131058:0crwdne131058:0 crwdns131060:0crwdne131060:0 ```js crwdns104588:0{ createFilterOptions }crwdne104588:0 ``` -### `crwdns130366:0crwdne130366:0` +### `crwdns131062:0crwdne131062:0` #### crwdns130368:0crwdne130368:0 1. crwdns104592:0[optional]crwdne104592:0 - crwdns104594:0[optional]crwdne104594:0 crwdns104596:0crwdne104596:0 - crwdns104598:0[optional]crwdne104598:0 crwdns104600:0crwdne104600:0 - - crwdns104602:0[optional]crwdne104602:0 - - crwdns130370:0[optional]crwdne130370:0 - - crwdns104606:0[optional]crwdne104606:0 crwdns104608:0crwdne104608:0 - - crwdns109191:0[optional]crwdne109191:0 crwdns109193:0crwdne109193:0 crwdns109195:0crwdne109195:0 crwdns109197:0crwdne109197:0 + - crwdns131064:0[optional]crwdne131064:0 crwdns131066:0crwdne131066:0 crwdns131068:0crwdne131068:0 crwdns131070:0crwdne131070:0 + - crwdns131072:0[optional]crwdne131072:0 + - crwdns131074:0[optional]crwdne131074:0 crwdns131076:0crwdne131076:0 + - crwdns131078:0[optional]crwdne131078:0 + - crwdns131080:0[optional]crwdne131080:0 crwdns131082:0crwdne131082:0 #### crwdns130372:0crwdne130372:0 -crwdns130796:0crwdne130796:0 +crwdns131084:0crwdne131084:0 -crwdns130798:0crwdne130798:0 +crwdns131086:0crwdne131086:0 ```js crwdns104612:0{filterOptions}crwdne104612:0 ``` -crwdns130800:0crwdne130800:0 +crwdns131088:0crwdne131088:0 -### crwdns130376:0crwdne130376:0 +### crwdns131090:0crwdne131090:0 -crwdns130802:0crwdne130802:0 crwdns130804:0crwdne130804:0 +crwdns131092:0crwdne131092:0 crwdns131094:0crwdne131094:0 ```jsx crwdns104620:0{ inputValue }crwdnd104620:0{filterOptions}crwdne104620:0 @@ -168,19 +175,19 @@ crwdns104620:0{ inputValue }crwdnd104620:0{filterOptions}crwdne104620:0 ## crwdns106467:0crwdne106467:0 -crwdns130806:0crwdne130806:0 crwdns130808:0crwdne130808:0 +crwdns131096:0crwdne131096:0 crwdns131098:0crwdne131098:0 -crwdns130810:0crwdne130810:0 +crwdns131100:0crwdne131100:0 ## crwdns106475:0crwdne106475:0 -### crwdns130378:0crwdne130378:0 +### crwdns131102:0crwdne131102:0 -crwdns130812:0crwdne130812:0 crwdns130814:0crwdne130814:0 +crwdns131104:0crwdne131104:0 crwdns131106:0crwdne131106:0 -crwdns130816:0crwdne130816:0 +crwdns131108:0crwdne131108:0 -crwdns130818:0crwdne130818:0 crwdns130820:0crwdne130820:0 +crwdns131110:0crwdne131110:0 crwdns131112:0crwdne131112:0 - crwdns107863:0crwdne107863:0 crwdns107865:0crwdne107865:0 crwdns107867:0crwdne107867:0 - crwdns107869:0crwdne107869:0 @@ -189,20 +196,20 @@ crwdns130818:0crwdne130818:0 crwdns130820:0crwdne130820:0 autoComplete: 'new-password', }}crwdne107871:0 -### crwdns130380:0crwdne130380:0 +### crwdns131114:0crwdne131114:0 -crwdns130822:0crwdne130822:0 crwdns130824:0crwdne130824:0 +crwdns131116:0crwdne131116:0 crwdns131118:0crwdne131118:0 -### crwdns130382:0crwdne130382:0 +### crwdns131120:0crwdne131120:0 -crwdns130826:0crwdne130826:0 crwdns130828:0crwdne130828:0 crwdns130830:0crwdne130830:0 +crwdns131122:0crwdne131122:0 crwdns131124:0crwdne131124:0 crwdns131126:0crwdne131126:0 -### crwdns130832:0crwdne130832:0 +### crwdns131128:0crwdne131128:0 -crwdns130834:0crwdne130834:0 crwdns130836:0crwdne130836:0 +crwdns131130:0crwdne131130:0 crwdns131132:0crwdne131132:0 ## crwdns106481:0crwdne106481:0 -crwdns130838:0crwdne130838:0 +crwdns131134:0crwdne131134:0 -crwdns130840:0crwdne130840:0 crwdns130842:0crwdne130842:0 \ No newline at end of file +crwdns131136:0crwdne131136:0 crwdns131138:0crwdne131138:0 \ No newline at end of file diff --git a/docs/src/pages/components/autocomplete/autocomplete-de.md b/docs/src/pages/components/autocomplete/autocomplete-de.md index a9cc0f7bd10f4e..c9a47febe71f9b 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-de.md +++ b/docs/src/pages/components/autocomplete/autocomplete-de.md @@ -106,6 +106,12 @@ Falls Sie bestimmte Tags sperren müssen, damit sie nicht in der Schnittstelle e {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## Größen Fancy smaller inputs? Verwenden Sie die `size` Prop. @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Alles in Kleinbuchstaben. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim ` (*Boolean* [optional]): Standardeinstellung ist `false`. Abschließende Leerzeichen entfernen. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### Rückgabewerte diff --git a/docs/src/pages/components/autocomplete/autocomplete-es.md b/docs/src/pages/components/autocomplete/autocomplete-es.md index 6f4be070cb8f40..0de82ed157f888 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-es.md +++ b/docs/src/pages/components/autocomplete/autocomplete-es.md @@ -106,6 +106,12 @@ In the event that you need to lock certain tag so that they can't be removed in {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## Tamaños Fancy smaller inputs? Use the `size` prop. @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*Boolean* [optional]): Default `false`. Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### Regresa diff --git a/docs/src/pages/components/autocomplete/autocomplete-fr.md b/docs/src/pages/components/autocomplete/autocomplete-fr.md index b10a8e83de1c09..af0b00b7ee0050 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-fr.md +++ b/docs/src/pages/components/autocomplete/autocomplete-fr.md @@ -106,6 +106,12 @@ In the event that you need to lock certain tag so that they can't be removed in {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## Tailles Fancy smaller inputs? Use the `size` prop. @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*Boolean* [optional]): Valeur par défaut `false`. Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### Valeur de retour diff --git a/docs/src/pages/components/autocomplete/autocomplete-ja.md b/docs/src/pages/components/autocomplete/autocomplete-ja.md index b07d1b751a6c73..9d624beb82f2e1 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-ja.md +++ b/docs/src/pages/components/autocomplete/autocomplete-ja.md @@ -106,6 +106,12 @@ In the event that you need to lock certain tag so that they can't be removed in {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## サイズ Fancy smaller inputs? `size`propを使用します。 @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*ブール値* [任意]): デフォルト値 `false`. Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### 戻り値 diff --git a/docs/src/pages/components/autocomplete/autocomplete-pt.md b/docs/src/pages/components/autocomplete/autocomplete-pt.md index 2e2098e39b3cb4..8cb1791ebeb904 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-pt.md +++ b/docs/src/pages/components/autocomplete/autocomplete-pt.md @@ -106,6 +106,12 @@ In the event that you need to lock certain tag so that they can't be removed in {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## Tamanhos Gosta mais de campos de texto menores? Use a propriedade `size`. @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*Boolean* [opcional]): Padrão `false`. Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### Retornos diff --git a/docs/src/pages/components/autocomplete/autocomplete-ru.md b/docs/src/pages/components/autocomplete/autocomplete-ru.md index 6f9cc699b3dd09..5e2609b5a7cfa9 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-ru.md +++ b/docs/src/pages/components/autocomplete/autocomplete-ru.md @@ -106,6 +106,12 @@ Also known as tags, the user is allowed to enter more than one value. {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## Размеры Fancy smaller inputs? Use the `size` prop. @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*Boolean* [optional]): По умолчанию - `false`. Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### Возвращает diff --git a/docs/src/pages/components/autocomplete/autocomplete-zh.md b/docs/src/pages/components/autocomplete/autocomplete-zh.md index c5f2dbc35568ba..8384105862a9e6 100644 --- a/docs/src/pages/components/autocomplete/autocomplete-zh.md +++ b/docs/src/pages/components/autocomplete/autocomplete-zh.md @@ -18,7 +18,7 @@ It's meant to be an improved version of the "react-select" and "downshift" packa 必须取值于一个预设的可选值集合 -{{"demo": "pages/components/autocomplete/combox.js"}} +{{"demo": "pages/components/autocomplete/ComboBox.js"}} ### 练习 @@ -44,11 +44,11 @@ Choose one of the 248 countries. 有时您想要向用户显示他/她可以添加自己想要的任何值。 以下的演示增加了一个最新的操作方式:`添加“你的搜索”` -{{"demo": "pages/components/autocomplete/FreeSolo.js"}} +{{"demo": "pages/components/autocomplete/FreeSoloCreateOption.js"}} 您也可以在用户想要添加一个新的值时显示一个对话框 -{{"demo": "pages/components/autocomplete/FreeSolo.js"}} +{{"demo": "pages/components/autocomplete/FreeSoloCreateOptionDialog.js"}} ## 分组 @@ -56,7 +56,7 @@ Choose one of the 248 countries. ## 已禁用的选项 -{{"demo": "pages/components/autocomplete/disabledOptions.js"}} +{{"demo": "pages/components/autocomplete/DisabledOptions.js"}} ## `使用自动完成` @@ -72,13 +72,13 @@ import useAutocomplete from '@material-ui/lab/useAutocomplete'; ### 自定义钩子 -{{"demo": "pages/components/autocomplete/ustomizedHook.js"}} +{{"demo": "pages/components/autocomplete/CustomizedHook.js"}} 转到[自定义自动完成](#customized-autocomplete)部分,查看使用 `Autocomplete` 组件(而不是钩子)的例子。 ## 异步请求 -{{"demo": "pages/components/autocomplete/disabledOptions.js"}} +{{"demo": "pages/components/autocomplete/Asynchronous.js"}} ### 谷歌地图位置 @@ -106,9 +106,15 @@ In the event that you need to lock certain tag so that they can't be removed in {{"demo": "pages/components/autocomplete/CheckboxesTags.js"}} +### Limit tags + +You can use the `limitTags` prop to limit the number of displayed options when not focused. + +{{"demo": "pages/components/autocomplete/LimitTags.js"}} + ## 尺寸 -想要使用外观看起来比较小的输入框吗? Use the `size` prop. +想要使用外观看起来比较小的输入框吗? 您可以使用 `size` 属性。 {{"demo": "pages/components/autocomplete/Sizes.js"}} @@ -141,10 +147,11 @@ import { createFilterOptions } from '@material-ui/lab/Autocomplete'; 1. `config` (*Object* [optional]): - `config.ignoreAccents` (*Boolean* [optional]): Defaults to `true`. Remove diacritics. - `config.ignoreCase` (*Boolean* [optional]): Defaults to `true`. Lowercase everything. + - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. - `config.matchFrom` (*'any' | 'start'* [optional]): Defaults to `'any'`. + - `config.startAfter`(*Number* [optional]): Default to `0`. Show the suggested options only after a certain number of letters - `config.stringify` (*Func* [optional]): Controls how an option is converted into a string so that it can be matched against the input text fragment. - `config.trim` (*Boolean* [optional]): 默认值为`false`。 Remove trailing spaces. - - `config.limit` (*Number* [optional]): Default to null. Limit the number of suggested options to be shown. For example, if `config.limit` is `100`, only the first `100` matching options are shown. It can be useful if a lot of options match and virtualization wasn't set up. #### 返回结果 diff --git a/docs/src/pages/components/avatars/avatars-zh.md b/docs/src/pages/components/avatars/avatars-zh.md index f62197b56ed468..029065b8978eff 100644 --- a/docs/src/pages/components/avatars/avatars-zh.md +++ b/docs/src/pages/components/avatars/avatars-zh.md @@ -1,5 +1,5 @@ --- -title: React Avatar(头像)组件 +title: React Avatar 头像组件 components: Avatar, AvatarGroup, Badge --- @@ -7,13 +7,13 @@ components: Avatar, AvatarGroup, Badge在整个 material design 中,无论是在表格中还是到对话框菜单中,都可以找到使用头像的身影。
-## Image avatars(图片头像) +## 图片头像 Image avatars can be created by passing standard `img` props `src` or `srcSet` to the component. {{"demo": "pages/components/avatars/ImageAvatars.js"}} -## Letter avatars(字母头像) +## 字母头像 Avatars containing simple characters can be created by passing a string as `children`. @@ -31,7 +31,7 @@ You can change the size of the avatar with the `height` and `width` CSS properti {{"demo": "pages/components/avatars/IconAvatars.js"}} -## 变种(Variants) +## 变种 If you need square or rounded avatars, use the `variant` prop. diff --git a/docs/src/pages/components/backdrop/backdrop-zh.md b/docs/src/pages/components/backdrop/backdrop-zh.md index 0dba7b9fef6481..c45ace2845ec5f 100644 --- a/docs/src/pages/components/backdrop/backdrop-zh.md +++ b/docs/src/pages/components/backdrop/backdrop-zh.md @@ -1,6 +1,6 @@ --- title: Backdrop React Component -components: 背景板(Backdrop) +components: Backdrop --- # Backdrop 背景板 diff --git a/docs/src/pages/components/badges/badges-zh.md b/docs/src/pages/components/badges/badges-zh.md index 068b055dfe0733..cc52a907c54ff9 100644 --- a/docs/src/pages/components/badges/badges-zh.md +++ b/docs/src/pages/components/badges/badges-zh.md @@ -1,6 +1,6 @@ --- -title: React Badge(徽章)组件 -components: Badge +title: React Badge 徽章组件 +components: 徽章 --- # Badge 徽章 diff --git a/docs/src/pages/components/bottom-navigation/bottom-navigation-zh.md b/docs/src/pages/components/bottom-navigation/bottom-navigation-zh.md index 5ba729002552d9..c5d931277057d7 100644 --- a/docs/src/pages/components/bottom-navigation/bottom-navigation-zh.md +++ b/docs/src/pages/components/bottom-navigation/bottom-navigation-zh.md @@ -1,5 +1,5 @@ --- -title: React Bottom Navigation(底部导航栏)组件 +title: React Bottom Navigation 底部导航栏组件 components: BottomNavigation, BottomNavigationAction --- diff --git a/docs/src/pages/components/box/box-zh.md b/docs/src/pages/components/box/box-zh.md index a961cf4f28c306..084abcde833d33 100644 --- a/docs/src/pages/components/box/box-zh.md +++ b/docs/src/pages/components/box/box-zh.md @@ -1,5 +1,5 @@ --- -title: React Box(分组)组件 +title: React Box分组组件 --- # Box 分组 diff --git a/docs/src/pages/components/breadcrumbs/breadcrumbs-zh.md b/docs/src/pages/components/breadcrumbs/breadcrumbs-zh.md index 382c05e4733dae..1f6d04e3aabd74 100644 --- a/docs/src/pages/components/breadcrumbs/breadcrumbs-zh.md +++ b/docs/src/pages/components/breadcrumbs/breadcrumbs-zh.md @@ -1,5 +1,5 @@ --- -title: React Breadcrumbs(面包屑导航)组件 +title: React Breadcrumbs 面包屑导航组件 components: Breadcrumbs, Link, Typography --- diff --git a/docs/src/pages/components/button-group/button-group-zh.md b/docs/src/pages/components/button-group/button-group-zh.md index e73311e9edf808..6736982921c847 100644 --- a/docs/src/pages/components/button-group/button-group-zh.md +++ b/docs/src/pages/components/button-group/button-group-zh.md @@ -3,7 +3,7 @@ title: ButtonGroup React component components: Button, ButtonGroup --- -# Button groups(按钮组) +# Button groups 按钮组ButtonGroup 组件可用于对相关按钮进行分组。
@@ -19,7 +19,7 @@ components: Button, ButtonGroup {{"demo": "pages/components/button-group/GroupOrientation.js"}} -### Split Button(分割按钮) +### 分割按钮 ButtonGroup 也可用于创建分割按钮。 下拉列表可以用于更改按钮相关的操作(如本例所示),或者用于立即出发一个相关的操作。 diff --git a/docs/src/pages/components/buttons/buttons-pt.md b/docs/src/pages/components/buttons/buttons-pt.md index 45795f31448896..d12d94b6cb1d12 100644 --- a/docs/src/pages/components/buttons/buttons-pt.md +++ b/docs/src/pages/components/buttons/buttons-pt.md @@ -3,7 +3,7 @@ title: Componente React para Botão components: Button, IconButton, ButtonBase --- -# Button (botão) +# BotãoBotões permitem que os usuários tomem ações e decisões com um simples toque.
@@ -21,7 +21,7 @@ components: Button, IconButton, ButtonBase {{"demo": "pages/components/buttons/ContainedButtons.js"}} -You can remove the elevation with the `disableElevation` prop. +Você pode remover a sombra com a propriedade `disableElevation`. {{"demo": "pages/components/buttons/DisableElevation.js"}} @@ -44,7 +44,7 @@ Botões delineados são uma alternativa de menor ênfase comparado com botões c {{"demo": "pages/components/buttons/OutlinedButtons.js"}} -## Upload button +## Botão de Upload {{"demo": "pages/components/buttons/UploadButtons.js"}} diff --git a/docs/src/pages/components/buttons/buttons-zh.md b/docs/src/pages/components/buttons/buttons-zh.md index 0ca3bc12d37716..732ef36359ffa2 100644 --- a/docs/src/pages/components/buttons/buttons-zh.md +++ b/docs/src/pages/components/buttons/buttons-zh.md @@ -107,7 +107,7 @@ components: Button, IconButton, ButtonBase 然而: -- You should add `pointer-events: none;` back when you need to display [tooltips on disabled elements](/components/tooltips/#disabled-elements). +- 如您要[在 disabled 不可用元素上显示提示文本](/components/tooltips/#disabled-elements),则需添加 `pointer-events: none;` - 若您加载除了一个 button 元素之外的元素, 例如,一个链接 `` 元素,指针是不会改变的。 2. **改变 DOM**。 您可以这样封装按钮: diff --git a/docs/src/pages/components/cards/cards-zh.md b/docs/src/pages/components/cards/cards-zh.md index 4d8e21ee9e3860..d3a778b7f1d1a8 100644 --- a/docs/src/pages/components/cards/cards-zh.md +++ b/docs/src/pages/components/cards/cards-zh.md @@ -1,5 +1,5 @@ --- -title: React Card(卡片)组件 +title: React Card 卡片组件 components: Card, CardActionArea, CardActions, CardContent, CardHeader, CardMedia, Collapse, Paper --- @@ -17,9 +17,9 @@ components: Card, CardActionArea, CardActions, CardContent, CardHeader, CardMedi {{"demo": "pages/components/cards/SimpleCard.js", "bg": true}} -### Outlined Card +### 描边卡片 -Set `variant="outlined"` to render an outlined card. +将 variant 的值设置为 outlined 以渲染描边卡片:`variant="outlined"` {{"demo": "pages/components/cards/OutlinedCard.js", "bg": true}} @@ -35,7 +35,7 @@ Set `variant="outlined"` to render an outlined card. {{"demo": "pages/components/cards/MediaCard.js", "bg": true}} -默认情况下,我们使用给`A floating action button (FAB) performs the primary, or most common, action on a screen.
@@ -17,7 +17,7 @@ A [floating action button](https://material.io/design/components/buttons-floatin {{"demo": "pages/components/floating-action-button/FloatingActionButtons.js"}} -## Size +## Size 大小 Use the `size` prop for larger or smaller floating action buttons. diff --git a/docs/src/pages/components/grid-list/grid-list-zh.md b/docs/src/pages/components/grid-list/grid-list-zh.md index 8b10658b1eb6ab..12dfd4947bcfbe 100644 --- a/docs/src/pages/components/grid-list/grid-list-zh.md +++ b/docs/src/pages/components/grid-list/grid-list-zh.md @@ -1,5 +1,5 @@ --- -title: React Grid List(网格列表)组件 +title: React Grid List 网格列表组件 components: GridList, GridListTile, GridListTileBar, ListSubheader, IconButton --- diff --git a/docs/src/pages/components/hidden/hidden-zh.md b/docs/src/pages/components/hidden/hidden-zh.md index 4ee7b147b76686..1e535a39cb5bcf 100644 --- a/docs/src/pages/components/hidden/hidden-zh.md +++ b/docs/src/pages/components/hidden/hidden-zh.md @@ -1,5 +1,5 @@ --- -title: React Hidden(隐藏)组件 +title: React Hidden 隐藏组件 components: Hidden --- diff --git a/docs/src/pages/components/icons/icons-aa.md b/docs/src/pages/components/icons/icons-aa.md index 25457493db9fda..3bc7fa08369519 100644 --- a/docs/src/pages/components/icons/icons-aa.md +++ b/docs/src/pages/components/icons/icons-aa.md @@ -17,9 +17,25 @@ crwdns103500:0crwdne103500:0 crwdns109979:0crwdne109979:0 crwdns105937:0crwdne105937:0 crwdns105939:0crwdne105939:0 -### crwdns102762:0crwdne102762:0 +### crwdns131142:0crwdne131142:0 -crwdns103514:0crwdne103514:0 crwdns103516:0crwdne103516:0 +crwdns131144:0crwdne131144:0 + +```sh +crwdns131146:0crwdne131146:0 +``` + +crwdns131148:0crwdne131148:0 + +crwdns131150:0crwdne131150:0 + +```sh +crwdns131152:0crwdne131152:0 +``` + +### crwdns131154:0crwdne131154:0 + +crwdns131156:0crwdne131156:0 - crwdns103518:0crwdne103518:0 @@ -33,9 +49,9 @@ crwdns103514:0crwdne103514:0 crwdns103516:0crwdne103516:0 crwdns103524:0{ AccessAlarm, ThreeDRotation }crwdne103524:0 ``` -crwdns103526:0crwdne103526:0 crwdns103528:0crwdne103528:0 crwdns103530:0crwdne103530:0 +crwdns131158:0crwdne131158:0 crwdns131160:0crwdne131160:0 crwdns131162:0crwdne131162:0 -crwdns105941:0crwdne105941:0 crwdns105943:0crwdne105943:0 crwdns103536:0crwdne103536:0 +crwdns131164:0crwdne131164:0 crwdns131166:0crwdne131166:0 crwdns131168:0crwdne131168:0 - crwdns105945:0crwdne105945:0 - crwdns105947:0crwdne105947:0 @@ -45,123 +61,123 @@ crwdns105941:0crwdne105941:0 crwdns105943:0crwdne105943:0 crwdns103536:0crwdne10 > crwdns105955:0crwdne105955:0 crwdns105957:0crwdne105957:0 -crwdns105959:0crwdne105959:0 +crwdns131170:0crwdne131170:0 ## crwdns103554:0crwdne103554:0 -crwdns105961:0crwdne105961:0 crwdns105963:0crwdne105963:0 +crwdns131172:0crwdne131172:0 crwdns131174:0crwdne131174:0 - crwdns105965:0crwdne105965:0 - crwdns105967:0crwdne105967:0 crwdns105969:0crwdne105969:0 - crwdns105971:0crwdne105971:0 crwdns105973:0crwdne105973:0 ```jsx -crwdns105975:0{...props}crwdne105975:0 +crwdns131176:0{...props}crwdne131176:0 ``` -### crwdns105977:0crwdne105977:0 +### crwdns131178:0crwdne131178:0 -crwdns105979:0crwdne105979:0 +crwdns131180:0crwdne131180:0 -### crwdns105981:0crwdne105981:0 +### crwdns131182:0crwdne131182:0 -crwdns105983:0crwdne105983:0 +crwdns131184:0crwdne131184:0 -### crwdns105985:0crwdne105985:0 +### crwdns131186:0crwdne131186:0 -crwdns105987:0crwdne105987:0 crwdns105989:0crwdne105989:0 crwdns105991:0crwdne105991:0 +crwdns131188:0crwdne131188:0 crwdns131190:0crwdne131190:0 crwdns131192:0crwdne131192:0 -**crwdns105993:0crwdne105993:0** +**crwdns131194:0crwdne131194:0** ```js -crwdns105995:0crwdne105995:0 +crwdns131196:0crwdne131196:0 ``` ```jsx -crwdns105997:0{StarIcon}crwdne105997:0 +crwdns131198:0{StarIcon}crwdne131198:0 ``` -### crwdns105999:0crwdne105999:0 +### crwdns131200:0crwdne131200:0 #### crwdns103572:0crwdne103572:0 -crwdns109981:0crwdne109981:0 +crwdns131202:0crwdne131202:0 #### crwdns103576:0crwdne103576:0 -crwdns106003:0crwdne106003:0 crwdns106005:0crwdne106005:0 +crwdns131204:0crwdne131204:0 crwdns131206:0crwdne131206:0 -crwdns106007:0crwdne106007:0 +crwdns131208:0crwdne131208:0 ## crwdns103584:0crwdne103584:0 -crwdns106009:0crwdne106009:0 crwdns106011:0crwdne106011:0 +crwdns131210:0crwdne131210:0 crwdns131212:0crwdne131212:0 ```html -crwdns106013:0crwdne106013:0 +crwdns131214:0crwdne131214:0 ``` -crwdns106015:0crwdne106015:0 crwdns106017:0crwdne106017:0 +crwdns131216:0crwdne131216:0 crwdns131218:0crwdne131218:0 -crwdns106019:0crwdne106019:0 +crwdns131220:0crwdne131220:0 ```jsx -crwdns106021:0crwdne106021:0 +crwdns131222:0crwdne131222:0 ``` -crwdns106023:0crwdne106023:0 crwdns106025:0crwdne106025:0 +crwdns131224:0crwdne131224:0 crwdns131226:0crwdne131226:0 -### crwdns106027:0crwdne106027:0 +### crwdns131228:0crwdne131228:0 -crwdns106029:0crwdne106029:0 +crwdns131230:0crwdne131230:0 -### crwdns106031:0crwdne106031:0 +### crwdns131232:0crwdne131232:0 -crwdns106033:0crwdne106033:0 +crwdns131234:0crwdne131234:0 -crwdns106035:0crwdne106035:0 +crwdns131236:0crwdne131236:0 ## crwdns102832:0crwdne102832:0 crwdns102834:0crwdne102834:0 -crwdns106037:0crwdne106037:0 crwdns106039:0crwdne106039:0 +crwdns131238:0crwdne131238:0 crwdns131240:0crwdne131240:0 -crwdns106041:0crwdne106041:0 +crwdns131242:0crwdne131242:0 ## crwdns102836:0crwdne102836:0 -crwdns106043:0crwdne106043:0 crwdns106045:0crwdne106045:0 +crwdns131244:0crwdne131244:0 crwdns131246:0crwdne131246:0 - crwdns106047:0crwdne106047:0 crwdns106049:0crwdne106049:0 - crwdns106051:0crwdne106051:0 crwdns106053:0crwdne106053:0 -### crwdns106055:0crwdne106055:0 +### crwdns131248:0crwdne131248:0 -crwdns106057:0crwdne106057:0 crwdns106059:0crwdne106059:0 +crwdns106075:0crwdne106075:0 crwdns106077:0crwdne106077:0 -### crwdns106061:0crwdne106061:0 +### crwdns131250:0crwdne131250:0 -crwdns106063:0crwdne106063:0 crwdns106065:0crwdne106065:0 +crwdns131252:0crwdne131252:0 crwdns131254:0crwdne131254:0 -crwdns106067:0crwdne106067:0 +crwdns131256:0crwdne131256:0 ```jsx -crwdns106069:0crwdne106069:0 +crwdns131258:0crwdne131258:0 -crwdns106071:0crwdne106071:0 +crwdns131260:0crwdne131260:0 ``` -### crwdns106073:0crwdne106073:0 +### crwdns131262:0crwdne131262:0 -crwdns106075:0crwdne106075:0 crwdns106077:0crwdne106077:0 +crwdns131264:0crwdne131264:0 crwdns131266:0crwdne131266:0 -### crwdns106079:0crwdne106079:0 +### crwdns131268:0crwdne131268:0 -crwdns106081:0crwdne106081:0 +crwdns131270:0crwdne131270:0 ```jsx -crwdns106083:0crwdne106083:0 +crwdns131272:0crwdne131272:0 -crwdns106085:0crwdne106085:0 +crwdns131274:0crwdne131274:0 ``` -### crwdns106087:0crwdne106087:0 +### crwdns131276:0crwdne131276:0 - crwdns106089:0crwdne106089:0 diff --git a/docs/src/pages/components/icons/icons-de.md b/docs/src/pages/components/icons/icons-de.md index 74e948fe93236a..ed77c5ff90610d 100644 --- a/docs/src/pages/components/icons/icons-de.md +++ b/docs/src/pages/components/icons/icons-de.md @@ -17,9 +17,33 @@ Material-UI provides icons support in three ways: Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). For each SVG icon, we export the respective React component from the @material-ui/icons package. You can [search the full list of these icons](/components/material-icons/). +### Installation + +Installieren Sie das Paket innerhalb des Projektordners mit: + +```sh +// mit npm +npm install @material-ui/icons + +// mit yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// mit npm +npm install @material-ui/core + +// mit yarn +yarn add @material-ui/core +``` + ### Nutzung -Install `@material-ui/icons`. Import icons using one of these two options: +Import icons using one of these two options: - Option 1: diff --git a/docs/src/pages/components/icons/icons-es.md b/docs/src/pages/components/icons/icons-es.md index cef019376a148d..f28718be8ded2f 100644 --- a/docs/src/pages/components/icons/icons-es.md +++ b/docs/src/pages/components/icons/icons-es.md @@ -17,9 +17,33 @@ Material-UI provides icons support in three ways: Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). For each SVG icon, we export the respective React component from the @material-ui/icons package. You can [search the full list of these icons](/components/material-icons/). +### Instalación + +Install the package in your project directory with: + +```sh +// usando npm +npm install @material-ui/icons + +// usando yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// usando npm +npm install @material-ui/core + +// usando yarn +yarn add @material-ui/core +``` + ### Implementación -Install `@material-ui/icons`. Import icons using one of these two options: +Import icons using one of these two options: - Option 1: diff --git a/docs/src/pages/components/icons/icons-fr.md b/docs/src/pages/components/icons/icons-fr.md index b30cc47db3ea96..c51ddd710dd2a6 100644 --- a/docs/src/pages/components/icons/icons-fr.md +++ b/docs/src/pages/components/icons/icons-fr.md @@ -17,9 +17,33 @@ Material-UI provides icons support in three ways: Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). For each SVG icon, we export the respective React component from the @material-ui/icons package. You can [search the full list of these icons](/components/material-icons/). +### Installation + +Install the package in your project directory with: + +```sh +// with npm +npm install @material-ui/icons + +// with yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// avec npm +npm install @material-ui/core + +// avec yarn +yarn add @material-ui/core +``` + ### Utilisation -Install `@material-ui/icons`. Import icons using one of these two options: +Import icons using one of these two options: - Option 1: diff --git a/docs/src/pages/components/icons/icons-ja.md b/docs/src/pages/components/icons/icons-ja.md index 356f707df807de..3220ef5fae6a51 100644 --- a/docs/src/pages/components/icons/icons-ja.md +++ b/docs/src/pages/components/icons/icons-ja.md @@ -17,9 +17,33 @@ Material-UI provides icons support in three ways: Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). For each SVG icon, we export the respective React component from the @material-ui/icons package. You can [search the full list of these icons](/components/material-icons/). +### インストール + +Install the package in your project directory with: + +```sh +// with npm +npm install @material-ui/icons + +// with yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// npmの場合 +npm install @material-ui/core + +// yarnの場合 +yarn add @material-ui/core +``` + ### 使い方 -Install `@material-ui/icons`. Import icons using one of these two options: +Import icons using one of these two options: - Option 1: @@ -112,7 +136,7 @@ Note: [mdi-material-ui](https://github.com/TeamWertarbyte/mdi-material-ui) has a ``` -`Icon` will set the correct class name for the Material icon font. For other fonts, you must supply the class name using the Icon component's `className` property. +`Icon` will set the correct class name for the Material icon font. 他のフォントの場合、Iconコンポーネントの `className` プロパティを使用して クラス名を指定する必要があります。 アイコンを使用するには、単純にアイコン名(フォントの合字)を `Icon` コンポーネントでラップします。例えば: diff --git a/docs/src/pages/components/icons/icons-pt.md b/docs/src/pages/components/icons/icons-pt.md index 315683245371a9..d13beba1e99fc7 100644 --- a/docs/src/pages/components/icons/icons-pt.md +++ b/docs/src/pages/components/icons/icons-pt.md @@ -17,9 +17,33 @@ Material-UI fornece suporte de ícones de três maneiras: Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). Para cada ícone SVG, exportamos o respectivo componente React do pacote @material-ui/icons. You can [search the full list of these icons](/components/material-icons/). +### Instalação + +Instale o pacote no diretório do projeto com: + +```sh +// utilizando o npm +npm install @material-ui/icons + +// utilizando o yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// usando npm +npm install @material-ui/core + +// usando yarn +yarn add @material-ui/core +``` + ### Utilização -Instale `@material-ui/icons`. Importe ícones usando uma destas duas opções: +Importe ícones usando uma destas duas opções: - Opção 1: diff --git a/docs/src/pages/components/icons/icons-ru.md b/docs/src/pages/components/icons/icons-ru.md index 69a0bfd3bb0bcd..7518e5db9ddf68 100644 --- a/docs/src/pages/components/icons/icons-ru.md +++ b/docs/src/pages/components/icons/icons-ru.md @@ -17,9 +17,33 @@ Material-UI обеспечивает поддержку иконок тремя Material Design has standardized over 1,100 official icons, each in five different "themes" (see below). For each SVG icon, we export the respective React component from the @material-ui/icons package. You can [search the full list of these icons](/components/material-icons/). +### Инструкция по установке + +Установите пакет в каталог проекта командой: + +```sh +// через npm +npm install @material-ui/icons + +// через yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +If you are not already using Material-UI in your project, you can add it with: + +```sh +// with npm +npm install @material-ui/core + +// with yarn +yarn add @material-ui/core +``` + ### Использование -Install `@material-ui/icons`. Import icons using one of these two options: +Import icons using one of these two options: - Option 1: diff --git a/docs/src/pages/components/icons/icons-zh.md b/docs/src/pages/components/icons/icons-zh.md index 9a32da4f773ef0..1d804fe38381c2 100644 --- a/docs/src/pages/components/icons/icons-zh.md +++ b/docs/src/pages/components/icons/icons-zh.md @@ -17,9 +17,33 @@ Material-UI 通过以下三种方式来支持图标的使用: Material Design 已经将1,100多个官方图标标准化,而每个图标都有五个不同的“主题”(见下文)。 对于每个 SVG 图标,我们从 @ material-ui/icons 包中导出相应的React组件。 您可以 [搜索完整的图标列表](/components/material-icons/)。 +### 安装 + +请在您的项目目录中用以下方式安装依赖包: + +```sh +// 通过 npm +npm install @material-ui/icons + +// 通过 yarn +yarn add @material-ui/icons +``` + +These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI. + +如果你尚未在你的项目中使用Material-UI, 你可以按如下方式安装: + +```sh +// 用 npm 安装 +npm install @material-ui/core + +// 用 yarn 安装 +yarn add @material-ui/core +``` + ### 使用 -安装 `@material-ui/icons`。 有两种导入图标的方法: +有两种导入图标的方法: - 方法 1: @@ -36,7 +60,7 @@ Material Design 已经将1,100多个官方图标标准化,而每个图标都 当然了,方法 1 比方法 2 安全得多,但是方法 2 提供了最好的开发体验。 在使用第二个方法之前,请确保您遵循 [最小化捆绑包大小指南](/guides/minimizing-bundle-size/#option-2)。 我们强烈建议您配置一个 Babel 插件。 -其中我们给每个图标配备了一个”主题“:Filled (default), Outlined, Rounded, Two tone 以及 Sharp。 若您想导入一个不是默认主题的图标组件,在图标名加主题做为后缀可以帮助你实现。 例如,`@material-ui/icons/Delete` 图标可以: +其中我们给每个图标配备了一个”主题“:Filled (default), Outlined, Rounded, Two tone 以及 Sharp。 若您想导入一个不是默认主题的图标组件,在图标名加主题做为后缀即可。 例如,`@material-ui/icons/Delete` 图标可以: - 导出为 Filled 主题(默认值):`@material-ui/icons/Delete`, - 导出为 Outlined 主题:`@material-ui/icons/DeleteOutlined`, @@ -44,17 +68,17 @@ Material Design 已经将1,100多个官方图标标准化,而每个图标都 - 导出为 Twotone 主题:`@material-ui/icons/DeleteTwoTone `, - 导出为 Sharp 主题:`@material-ui/icons/DeleteSharp `, -> Note: The Material Design specification names the icons using "snake_case" naming (for example `delete_forever`, `add_a_photo`), while `@material-ui/icons` exports the respective icons using "PascalCase" naming (for example `DeleteForever`, `AddAPhoto`). There are three exceptions to this naming rule: `3d_rotation` exported as `ThreeDRotation`, `4k` exported as `FourK`, and `360` exported as `ThreeSixty`. +> 友情提示:Material Design 在命名图标的时候遵循了 “snake_case” 变量命名法(例如,`delete_forever` 和 `add_a_photo`),而 `@material-ui/icons` 则使用 “PascalCase” 来命名导出的相应图标(例如,`DeleteForever` 以及 `AddAPhoto`)。 并且此命名规则有三个特例:`3d_rotation` 导出为 `ThreeDRotation`,`4k` 导出为 `FourK`,以及 `360` 导出为 `ThreeSixty`。 {{"demo": "pages/components/icons/SvgMaterialIcons.js"}} -## SvgIcon(Svg 图标) +## SvgIcon Svg 图标 -If you need a custom SVG icon (not available in the Material Icons [default set](/components/material-icons/)) you can use the `SvgIcon` wrapper. This component extends the native `