mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
* 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>
36 lines
846 B
TypeScript
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)];
|
|
});
|