|
|
|
@@ -0,0 +1,20 @@ |
|
|
|
import { Typography } from 'antd'; |
|
|
|
import styles from './index.less'; |
|
|
|
|
|
|
|
type DisabledInputProps = { |
|
|
|
value?: any; |
|
|
|
valuePropName?: string; |
|
|
|
}; |
|
|
|
|
|
|
|
function DisabledInput({ value, valuePropName }: DisabledInputProps) { |
|
|
|
const data = valuePropName ? value[valuePropName] : value; |
|
|
|
return ( |
|
|
|
<div className={styles['disabled-input']}> |
|
|
|
<Typography.Text ellipsis={{ tooltip: data }} style={{ color: 'inherit' }}> |
|
|
|
{data} |
|
|
|
</Typography.Text> |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
export default DisabledInput; |