mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-17 02:18:07 +08:00
41fba82b39
* refactor: refactor InputAddon code * fix: fix * fix: fix * Update components/_util/InputAddon.tsx Signed-off-by: afc163 <afc163@gmail.com> * fix: fix lint --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: afc163 <afc163@gmail.com>
16 lines
365 B
TypeScript
16 lines
365 B
TypeScript
import React from 'react';
|
|
|
|
import { NoFormStyle } from '../form/context';
|
|
import { NoCompactStyle } from '../space/Compact';
|
|
|
|
const getInputAddon = (addon: React.ReactNode): React.ReactNode =>
|
|
addon ? (
|
|
<NoCompactStyle>
|
|
<NoFormStyle override status>
|
|
{addon}
|
|
</NoFormStyle>
|
|
</NoCompactStyle>
|
|
) : null;
|
|
|
|
export default getInputAddon;
|