docs: update component CSS variable names (#8857)

This commit is contained in:
neverland
2021-06-14 10:23:47 +08:00
committed by GitHub
parent 34a3fe8787
commit 8e3833acc8
122 changed files with 1755 additions and 1755 deletions
+14 -14
View File
@@ -97,7 +97,7 @@ export default {
### Methods
| Methods | Attribute | Return value | Description |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| Notify | `options | message` | notify instance | Show notify |
| Notify.clear | - | `void` | Close notify |
| Notify.setDefaultOptions | `options` | `void` | Set default options of all notifies |
@@ -106,7 +106,7 @@ export default {
### Options
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| type | Can be set to `primary` `success` `warning` | _string_ | `danger` |
| message | Message | _string_ | - |
| duration | Duration(ms), won't disappear if value is 0 | _number \| string_ | `3000` |
@@ -118,17 +118,17 @@ export default {
| onOpened | Callback function after opened | _() => void_ | - |
| onClose | Callback function after close | _() => void_ | - |
### Less Variables
### CSS Variables
How to use: [Custom Theme](#/en-US/theme).
The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider).
| Name | Default Value | Description |
| -------------------------------- | ------------------------- | ----------- |
| @notify-text-color | `@white` | - |
| @notify-padding | `@padding-xs @padding-md` | - |
| @notify-font-size | `@font-size-md` | - |
| @notify-line-height | `@line-height-md` | - |
| @notify-primary-background-color | `@blue` | - |
| @notify-success-background-color | `@green` | - |
| @notify-danger-background-color | `@red` | - |
| @notify-warning-background-color | `@orange` | - |
| Name | Default Value | Description |
| --- | --- | --- |
| --van-notify-text-color | `@white` | - |
| --van-notify-padding | `@padding-xs @padding-md` | - |
| --van-notify-font-size | `@font-size-md` | - |
| --van-notify-line-height | `@line-height-md` | - |
| --van-notify-primary-background-color | `@blue` | - |
| --van-notify-success-background-color | `@green` | - |
| --van-notify-danger-background-color | `@red` | - |
| --van-notify-warning-background-color | `@orange` | - |
+12 -12
View File
@@ -130,7 +130,7 @@ export default {
### 方法
| 方法名 | 说明 | 参数 | 返回值 |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| Notify | 展示提示 | `options | message` | notify 实例 |
| Notify.clear | 关闭提示 | - | `void` |
| Notify.setDefaultOptions | 修改默认配置,对所有 Notify 生效 | `options` | `void` |
@@ -153,15 +153,15 @@ export default {
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/config-provider)。
| 名称 | 默认值 | 描述 |
| -------------------------------- | ------------------------- | ---- |
| @notify-text-color | `@white` | - |
| @notify-padding | `@padding-xs @padding-md` | - |
| @notify-font-size | `@font-size-md` | - |
| @notify-line-height | `@line-height-md` | - |
| @notify-primary-background-color | `@blue` | - |
| @notify-success-background-color | `@green` | - |
| @notify-danger-background-color | `@red` | - |
| @notify-warning-background-color | `@orange` | - |
| 名称 | 默认值 | 描述 |
| ------------------------------------- | ------------------------- | ---- |
| --van-notify-text-color | `@white` | - |
| --van-notify-padding | `@padding-xs @padding-md` | - |
| --van-notify-font-size | `@font-size-md` | - |
| --van-notify-line-height | `@line-height-md` | - |
| --van-notify-primary-background-color | `@blue` | - |
| --van-notify-success-background-color | `@green` | - |
| --van-notify-danger-background-color | `@red` | - |
| --van-notify-warning-background-color | `@orange` | - |