chore: Delete the rate useless css (#45927)

Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
JarvisArt 2023-11-20 10:18:05 +08:00 committed by GitHub
parent 48e9bca683
commit d8d53f14cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1814 additions and 1761 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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>
</>
);

View File

@ -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>
);
};

View File

@ -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),
},