Skip to content

Commit 3fe862e

Browse files
authored
Feature/color fixes (#362)
* minor color changes * minor color changes
1 parent 834da06 commit 3fe862e

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

demo_markdown/docs/_guide/theme/customize_theme.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ let on_customize_dark_theme = move |_| {
5555
theme.set(Theme::custom_dark(&brand_colors.get()));
5656
};
5757
let value = RwSignal::new(0.0);
58+
let page = RwSignal::new(1);
59+
let selected_value = RwSignal::new(String::from("apple"));
5860

5961
view! {
6062
<ConfigProvider theme>
@@ -64,13 +66,42 @@ view! {
6466
<Button appearance=ButtonAppearance::Primary on_click=on_customize_light_theme>"Custom Light Theme"</Button>
6567
<Button appearance=ButtonAppearance::Primary on_click=on_customize_dark_theme>"Custom Dark Theme"</Button>
6668
</Space>
67-
<Input/>
6869
<Link href="https://react.fluentui.dev/?path=/docs/theme-theme-designer--docs">
6970
"You can use this tool to generate brand color palette"
7071
</Link>
71-
<Checkbox />
72+
<TabList selected_value>
73+
<Tab value="apple">
74+
"Apple"
75+
</Tab>
76+
<Tab value="pear">
77+
"Pear"
78+
</Tab>
79+
</TabList>
80+
<RadioGroup value=selected_value>
81+
<Radio value="apple" label="Apple"/>
82+
<Radio value="pear" label="Pear"/>
83+
</RadioGroup>
84+
<InfoLabel>
85+
<InfoLabelInfo slot>
86+
"This is example information for an InfoLabel. "
87+
</InfoLabelInfo>
88+
"Example label"
89+
</InfoLabel>
7290
<Badge appearance=BadgeAppearance::Filled>"10+"</Badge>
91+
<Checkbox />
92+
<Switch />
93+
<Tag dismissible=true>"Tag"</Tag> //TODO make dismissable
94+
<Input/>
95+
<Select>
96+
<option>"Red"</option>
97+
<option>"Green"</option>
98+
<option>"Blue"</option>
99+
</Select>
100+
<TimePicker />
101+
<DatePicker/>
73102
<Slider step=25.0 value/>
103+
<ProgressBar value/>
104+
<Pagination page page_count=10 />
74105
</Card>
75106
</ConfigProvider>
76107
}

thaw/src/radio/radio.css

+18-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
color: var(--colorCompoundBrandForeground1);
5151
}
5252

53+
.thaw-radio__input:hover:checked ~ .thaw-radio__indicator {
54+
color: var(--colorCompoundBrandForeground1Hover);
55+
}
56+
57+
.thaw-radio__input:hover:active ~ .thaw-radio__indicator {
58+
color: var(--colorCompoundBrandForeground1Pressed);
59+
}
60+
5361
.thaw-radio__indicator::after {
5462
position: absolute;
5563
width: 16px;
@@ -74,11 +82,19 @@
7482
line-height: var(--lineHeightBase300);
7583
font-size: var(--fontSizeBase300);
7684
font-family: var(--fontFamilyBase);
85+
color: var(--colorNeutralForeground3);
86+
}
87+
88+
.thaw-radio__input:enabled:hover ~ .thaw-radio__label {
89+
color: var(--colorNeutralForeground2);
90+
}
91+
92+
.thaw-radio__input:enabled:active ~ .thaw-radio__label {
7793
color: var(--colorNeutralForeground1);
7894
}
7995

80-
.thaw-radio__input:enabled:not(:checked) ~ .thaw-radio__label {
81-
color: var(--colorNeutralForeground3);
96+
.thaw-radio__input:enabled:checked ~ .thaw-radio__label {
97+
color: var(--colorNeutralForeground1);
8298
}
8399

84100
.thaw-radio__input:enabled ~ .thaw-radio__label {

thaw/src/switch/switch.css

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@
4545
border-color: var(--colorTransparentStroke);
4646
}
4747

48+
.thaw-switch__input:enabled:checked:hover ~ .thaw-switch__indicator {
49+
background-color: var(--colorCompoundBrandBackgroundHover);
50+
}
51+
52+
.thaw-switch__input:enabled:checked:active ~ .thaw-switch__indicator {
53+
background-color: var(--colorCompoundBrandBackgroundPressed);
54+
}
55+
4856
.thaw-switch__indicator > svg {
4957
display: inline;
5058
line-height: 0;

0 commit comments

Comments
 (0)