Skip to content

Commit

Permalink
zu: Fix html character error
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Nov 24, 2023
1 parent 65008be commit ff372ed
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 36 deletions.
6 changes: 4 additions & 2 deletions crates/zu/src/form_control_label/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ pub fn form_control_label(props: &Props) -> Html {
</Typography>

if props.required {
<span class={asterisk_cls} aria-hidden="true">
{"&thinsp;{'*'}"}
<span
aria-hidden="true"
class={asterisk_cls}>
{"\u{2009}*"}
</span>
}
</label>
Expand Down
4 changes: 2 additions & 2 deletions crates/zu/src/form_label/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ pub fn form_label(props: &Props) -> Html {

if props.required {
<span
aria_hidden={"true"}
aria-hidden="true"
class={asterisk_cls}>
{"&thinsp;*"}
{"\u{2009}*"}
</span>
}
</@>
Expand Down
32 changes: 16 additions & 16 deletions crates/zu/src/themes/dark-palette.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ $zu-palette-secondary-light: #f3e5f5 !default;
$zu-palette-secondary-dark: #ab47bc !default;
$zu-palette-secondary-contrastText: rgba(0, 0, 0, 0.87) !default;

// error
$zu-palette-error-main: #f44336 !default;
$zu-palette-error-light: #e57373 !default;
$zu-palette-error-dark: #d32f2f !default;
$zu-palette-error-contrastText: #fff !default;

// warning
$zu-palette-warning-main: #ffa726 !default;
$zu-palette-warning-light: #ffb74d !default;
$zu-palette-warning-dark: #f57c00 !default;
$zu-palette-warning-contrastText: rgba(0, 0, 0, 0.87) !default;
// success
$zu-palette-success-main: #66bb6a !default;
$zu-palette-success-light: #81c784 !default;
$zu-palette-success-dark: #388e3c !default;
$zu-palette-success-contrastText: rgba(0, 0, 0, 0.87) !default;

// info
$zu-palette-info-main: #29b6f6 !default;
$zu-palette-info-light: #4fc3f7 !default;
$zu-palette-info-dark: #0288d1 !default;
$zu-palette-info-contrastText: rgba(0, 0, 0, 0.87) !default;

// success
$zu-palette-success-main: #66bb6a !default;
$zu-palette-success-light: #81c784 !default;
$zu-palette-success-dark: #388e3c !default;
$zu-palette-success-contrastText: rgba(0, 0, 0, 0.87) !default;
// warning
$zu-palette-warning-main: #ffa726 !default;
$zu-palette-warning-light: #ffb74d !default;
$zu-palette-warning-dark: #f57c00 !default;
$zu-palette-warning-contrastText: rgba(0, 0, 0, 0.87) !default;

// error
$zu-palette-error-main: #f44336 !default;
$zu-palette-error-light: #e57373 !default;
$zu-palette-error-dark: #d32f2f !default;
$zu-palette-error-contrastText: #fff !default;

$zu-palette-contrastThreshold: 3 !default;
$zu-palette-totalOffset: 0.2 !default;
Expand Down
32 changes: 16 additions & 16 deletions crates/zu/src/themes/light-palette.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ $zu-palette-secondary-light: #ba68c8 !default;
$zu-palette-secondary-dark: #7b1fa2 !default;
$zu-palette-secondary-contrastText: #fff !default;

// error
$zu-palette-error-main: #d32f2f !default;
$zu-palette-error-light: #ef5350 !default;
$zu-palette-error-dark: #c62828 !default;
$zu-palette-error-contrastText: #fff !default;

// warning
$zu-palette-warning-main: #ed6c02 !default;
$zu-palette-warning-light: #ff9800 !default;
$zu-palette-warning-dark: #e65100 !default;
$zu-palette-warning-contrastText: #fff !default;
// success
$zu-palette-success-main: #2e7d32 !default;
$zu-palette-success-light: #4caf50 !default;
$zu-palette-success-dark: #1b5e20 !default;
$zu-palette-success-contrastText: #fff !default;

// info
$zu-palette-info-main: #0288d1 !default;
$zu-palette-info-light: #03a9f4 !default;
$zu-palette-info-dark: #01579b !default;
$zu-palette-info-contrastText: #fff !default;

// success
$zu-palette-success-main: #2e7d32 !default;
$zu-palette-success-light: #4caf50 !default;
$zu-palette-success-dark: #1b5e20 !default;
$zu-palette-success-contrastText: #fff !default;
// warning
$zu-palette-warning-main: #ed6c02 !default;
$zu-palette-warning-light: #ff9800 !default;
$zu-palette-warning-dark: #e65100 !default;
$zu-palette-warning-contrastText: #fff !default;

// error
$zu-palette-error-main: #d32f2f !default;
$zu-palette-error-light: #ef5350 !default;
$zu-palette-error-dark: #c62828 !default;
$zu-palette-error-contrastText: #fff !default;

$zu-palette-contrastThreshold: 3 !default;
$zu-palette-totalOffset: 0.2 !default;
Expand Down

0 comments on commit ff372ed

Please sign in to comment.