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(Slider): update disabled style #2957

Merged
merged 4 commits into from
Feb 18, 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
8 changes: 8 additions & 0 deletions src/BootstrapBlazor.Server/Components/Samples/Sliders.razor
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@
</div>
</DemoBlock>

<DemoBlock Title="@Localizer["SlidersIsDisabledTitle"]" Introduction="@Localizer["SlidersIsDisabledIntro"]" Name="IsDisabled">
<div class="row">
<div class="col-12 col-sm-6">
<Slider TValue="double" Step="1" IsDisabled="true"></Slider>
</div>
</div>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />

<EventTable Items="@GetEvents()" />
Expand Down
2 changes: 2 additions & 0 deletions src/BootstrapBlazor.Server/Locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3038,6 +3038,8 @@
"SlidersNormalTitle": "Basic usage",
"SlidersNormalIntro": "Change the current value as you drag the slider",
"SlidersRangeTitle": "Range",
"SlidersIsDisabledTitle": "Disabled",
"SlidersIsDisabledIntro": "Disable components by setting <code>IsDisabled=\"true\"</code>",
"SlidersRangeIntro": "Auto generate <code>min</code> <code>max</code> by set <code>RangeAttribute</code>",
"SlidersIsDisabled": "Whether to disable it",
"SlidersValue": "The current value of the component",
Expand Down
2 changes: 2 additions & 0 deletions src/BootstrapBlazor.Server/Locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3038,6 +3038,8 @@
"SlidersNormalTitle": "基础用法",
"SlidersNormalIntro": "在拖动滑块时,改变当前值",
"SlidersRangeTitle": "Range 标签",
"SlidersIsDisabledTitle": "禁用",
"SlidersIsDisabledIntro": "通过设置 <code>IsDisabled=\"true\" 禁用组件",
"SlidersRangeIntro": "通过设置绑定值标签 <code>RangeAttribute</code> 自动生成 <code>min</code> <code>max</code>",
"SlidersIsDisabled": "是否禁用",
"SlidersValue": "组件当前值",
Expand Down
6 changes: 6 additions & 0 deletions src/BootstrapBlazor/Components/Slider/Slider.razor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@
margin-top: var(--bb-form-range-margin-top);
}
}

.form-range {
&:disabled {
background-color: unset;
}
}