Browse Source
* ✨ feat: migrate less to token for Slider * ✨ feat: update snap * ✨ feat: update style * ✨ feat: update style * ✨ feat: test ci * ✨ feat: test ci * ✨ feat: test ci * ✨ feat: test ci * ✨ feat: update * ✨ feat: update snap * ✨ feat: update * ✨ feat: update * ✨ feat: 删除未使用token * ✨ feat: update doc * ✨ feat: update dome * ✨ feat: update * ✨ feat: test ci * 📝 doc: update doc * ✨ feat: update * ✨ feat: update * ✨ feat: update * ✨ feat: update * ✨ feat: add demo * ✨ feat: add demo * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * ✨ feat: update for reviewer * Apply suggestions from code review --------- Co-authored-by: MadCcc <1075746765@qq.com>pull/43098/head
黑雨
1 year ago
committed by
GitHub
9 changed files with 727 additions and 15 deletions
@ -0,0 +1,7 @@ |
|||
## zh-CN |
|||
|
|||
Component Token Debug. |
|||
|
|||
## en-US |
|||
|
|||
Component Token Debug. |
@ -0,0 +1,59 @@ |
|||
import { ConfigProvider, Slider } from 'antd'; |
|||
import React from 'react'; |
|||
|
|||
const style: React.CSSProperties = { |
|||
display: 'inline-block', |
|||
height: 300, |
|||
marginLeft: 70, |
|||
}; |
|||
|
|||
const marks = { |
|||
0: '0°C', |
|||
26: '26°C', |
|||
37: '37°C', |
|||
100: { |
|||
style: { color: '#f50' }, |
|||
label: <strong>100°C</strong>, |
|||
}, |
|||
}; |
|||
|
|||
const App: React.FC = () => ( |
|||
<ConfigProvider |
|||
theme={{ |
|||
components: { |
|||
Slider: { |
|||
controlSize: 20, |
|||
railSize: 4, |
|||
handleSize: 22, |
|||
handleSizeHover: 18, |
|||
dotSize: 8, |
|||
handleLineWidth: 6, |
|||
handleLineWidthHover: 2, |
|||
railBg: '#9f3434', |
|||
railHoverBg: '#8d2424', |
|||
trackBg: '#b0b0ef', |
|||
trackHoverBg: '#c77195', |
|||
handleColor: '#e6f6a2', |
|||
handleActiveColor: '#d22bc4', |
|||
dotBorderColor: '#303030', |
|||
dotActiveBorderColor: '#918542', |
|||
trackBgDisabled: '#1a1b80', |
|||
}, |
|||
}, |
|||
}} |
|||
> |
|||
<Slider defaultValue={30} disabled /> |
|||
<Slider range={{ draggableTrack: true }} defaultValue={[20, 50]} /> |
|||
<div style={style}> |
|||
<Slider vertical defaultValue={30} /> |
|||
</div> |
|||
<div style={style}> |
|||
<Slider vertical range step={10} defaultValue={[20, 50]} /> |
|||
</div> |
|||
<div style={style}> |
|||
<Slider vertical range marks={marks} defaultValue={[26, 37]} /> |
|||
</div> |
|||
</ConfigProvider> |
|||
); |
|||
|
|||
export default App; |
Loading…
Reference in new issue