Files
ant-design/components/input/style/search.ts
EmilyyyLiu bbef6f8752 feat[Input.Search]: Abandoning the use of addon * in the Search component (#55705)
* refactor: Search component refactoring using compact

* test: update snap

* test: update snap

* test: update snap

* chore: fix style

* chore: fix search style

* test: update snapshot

* test: update snapshot

* test: update snapshot

---------

Co-authored-by: 刘欢 <lh01217311@antgroup.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
2025-11-14 16:16:23 +08:00

36 lines
846 B
TypeScript

import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genStyleHooks } from '../../theme/internal';
const genSearchStyle: GenerateStyle<FullToken<'Input'>> = (token) => {
const { componentCls } = token;
const btnCls = `${componentCls}-btn`;
return {
[componentCls]: {
width: '100%',
// =========================== Button ===========================
[btnCls]: {
'&-filled': {
background: token.colorFillTertiary,
'&:not(:disabled)': {
'&:hover': {
background: token.colorFillSecondary,
},
'&:active': {
background: token.colorFill,
},
},
},
},
},
};
};
export default genStyleHooks(['Input', 'Search'], (token) => {
return [genSearchStyle(token)];
});