mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
chore: Delete the rate useless css (#45927)
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
48e9bca683
commit
d8d53f14cf
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,17 @@
|
||||
import React from 'react';
|
||||
import { Rate } from 'antd';
|
||||
import { Space, Rate } from 'antd';
|
||||
|
||||
const App: React.FC = () => (
|
||||
<>
|
||||
<Rate defaultValue={3} />
|
||||
<span className="ant-rate-text">allowClear: true</span>
|
||||
<Space>
|
||||
<Rate defaultValue={3} />
|
||||
<span>allowClear: true</span>
|
||||
</Space>
|
||||
<br />
|
||||
<Rate allowClear={false} defaultValue={3} />
|
||||
<span className="ant-rate-text">allowClear: false</span>
|
||||
<Space>
|
||||
<Rate allowClear={false} defaultValue={3} />
|
||||
<span>allowClear: false</span>
|
||||
</Space>
|
||||
</>
|
||||
);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Rate } from 'antd';
|
||||
import { Space, Rate } from 'antd';
|
||||
|
||||
const desc = ['terrible', 'bad', 'normal', 'good', 'wonderful'];
|
||||
|
||||
@ -7,10 +7,10 @@ const App: React.FC = () => {
|
||||
const [value, setValue] = useState(3);
|
||||
|
||||
return (
|
||||
<span>
|
||||
<Space>
|
||||
<Rate tooltips={desc} onChange={setValue} value={value} />
|
||||
{value ? <span className="ant-rate-text">{desc[value - 1]}</span> : ''}
|
||||
</span>
|
||||
{value ? <span>{desc[value - 1]}</span> : ''}
|
||||
</Space>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -120,13 +120,6 @@ const genRateStyle: GenerateStyle<RateToken> = (token) => {
|
||||
// star styles
|
||||
...genRateStarStyle(token),
|
||||
|
||||
// text styles
|
||||
[`+ ${componentCls}-text`]: {
|
||||
display: 'inline-block',
|
||||
marginInlineStart: token.marginXS,
|
||||
fontSize: token.fontSize,
|
||||
},
|
||||
|
||||
// rtl styles
|
||||
...genRateRtlStyle(token),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user