|
|
@ -9,6 +9,7 @@ export default function ReadOnlyInput (props) { |
|
|
|
value, |
|
|
|
value, |
|
|
|
textarea, |
|
|
|
textarea, |
|
|
|
onClick, |
|
|
|
onClick, |
|
|
|
|
|
|
|
autoFocus = false, |
|
|
|
} = props |
|
|
|
} = props |
|
|
|
|
|
|
|
|
|
|
|
const InputType = textarea ? 'textarea' : 'input' |
|
|
|
const InputType = textarea ? 'textarea' : 'input' |
|
|
@ -21,6 +22,7 @@ export default function ReadOnlyInput (props) { |
|
|
|
readOnly |
|
|
|
readOnly |
|
|
|
onFocus={(event) => event.target.select()} |
|
|
|
onFocus={(event) => event.target.select()} |
|
|
|
onClick={onClick} |
|
|
|
onClick={onClick} |
|
|
|
|
|
|
|
autoFocus={autoFocus} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
) |
|
|
@ -32,4 +34,5 @@ ReadOnlyInput.propTypes = { |
|
|
|
value: PropTypes.string, |
|
|
|
value: PropTypes.string, |
|
|
|
textarea: PropTypes.bool, |
|
|
|
textarea: PropTypes.bool, |
|
|
|
onClick: PropTypes.func, |
|
|
|
onClick: PropTypes.func, |
|
|
|
|
|
|
|
autoFocus: PropTypes.bool, |
|
|
|
} |
|
|
|
} |
|
|
|