Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialog): 新增 CSS 变量 #1844

Merged
merged 8 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/packages/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
&-header {
display: block;
text-align: center;
font-size: $font-size-large;
font-size: $dialog-header-font-size;
font-weight: $dialog-header-font-weight;
color: $color-title;
@include oneline-ellipsis();
Expand Down
1 change: 1 addition & 0 deletions src/packages/dialog/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ The component provides the following CSS variables, which can be used to customi
| \--nutui-dialog-content-max-height | dialog content max height | `268px` |
| \--nutui-dialog-content-line-height | dialog content line height | `20px` |
| \--nutui-dialog-content-text-align | dialog content text align | `left` |
| \--nutui-dialog-header-font-size | dialog header font size | `$font-size-large` |
| \--nutui-dialog-header-font-weight | dialog header font weight | `normal` |
| \--nutui-dialog-footer-justify-content | dialog footer justify content | `space-around` |
| \--nutui-dialog-footer-button-min-width | dialog footer button min width | `117px` |
Expand Down
1 change: 1 addition & 0 deletions src/packages/dialog/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export default function App() {
| \--nutui-dialog-content-max-height | 对话框内容最大高度 | `268px` |
| \--nutui-dialog-content-line-height | 对话框内容行高 | `20px` |
| \--nutui-dialog-content-text-align | 对话框内容文本对齐方式 | `left` |
| \--nutui-dialog-header-font-size | 对话框标题字体大小 | `$font-size-large` |
| \--nutui-dialog-header-font-weight | 对话框标题字重 | `normal` |
| \--nutui-dialog-footer-justify-content | 对话框底部按钮排布 | `space-around` |
| \--nutui-dialog-footer-button-min-width | 对话框底部按钮最小宽度 | `117px` |
Expand Down
1 change: 1 addition & 0 deletions src/packages/dialog/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ DialogOptions 是 DialogProps 的子集,包含如下属性:title, content, f
| \--nutui-dialog-content-max-height | 对话框内容最大高度 | `268px` |
| \--nutui-dialog-content-line-height | 对话框内容行高 | `20px` |
| \--nutui-dialog-content-text-align | 对话框内容文本对齐方式 | `left` |
| \--nutui-dialog-header-font-size | 对话框标题字体大小 | `$font-size-large` |
| \--nutui-dialog-header-font-weight | 对话框标题字重 | `normal` |
| \--nutui-dialog-footer-justify-content | 对话框底部按钮排布 | `space-around` |
| \--nutui-dialog-footer-button-min-width | 对话框底部按钮最小宽度 | `117px` |
Expand Down
1 change: 1 addition & 0 deletions src/packages/dialog/doc.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export default function App() {
| \--nutui-dialog-content-max-height | 對話框內容最大高度 | `268px` |
| \--nutui-dialog-content-line-height | 對話框內容行高 | `20px` |
| \--nutui-dialog-content-text-align | 對話框內容文本對齊方式 | `left` |
| \--nutui-dialog-header-font-size | 對話框標題字体大小 | `$font-size-large` |
| \--nutui-dialog-header-font-weight | 對話框標題字重 | `normal` |
| \--nutui-dialog-footer-justify-content | 對話框底部按鈕排布 | `space-around` |
| \--nutui-dialog-footer-button-min-width | 對話框底部按鈕最小寬度 | `117px` |
Expand Down
4 changes: 4 additions & 0 deletions src/styles/variables-jmapp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,10 @@ $dialog-footer-ok-max-width: var(
--nutui-dialog-footer-ok-max-width,
128px
) !default;
$dialog-header-font-size: var(
--nutui-dialog-header-font-size,
$font-size-large
) !default;
$dialog-header-font-weight: var(
--nutui-dialog-header-font-weight,
normal
Expand Down
4 changes: 4 additions & 0 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,10 @@ $dialog-footer-ok-max-width: var(
--nutui-dialog-footer-ok-max-width,
128px
) !default;
$dialog-header-font-size: var(
--nutui-dialog-header-font-size,
$font-size-large
) !default;
$dialog-header-font-weight: var(
--nutui-dialog-header-font-weight,
normal
Expand Down
Loading