diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-05-30 21:11:40 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2026-02-20 15:13:00 -0500 |
| commit | 16baa822cc897fa8764c14861f7869f46ca50e30 (patch) | |
| tree | a970198a53dd4449ed8702d90433fda787075bcd /components/Input | |
| parent | 56a2f28565244127bb91ebabac731eaef950f3ec (diff) | |
Compress results gif
Diffstat (limited to 'components/Input')
| -rw-r--r-- | components/Input/index.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/components/Input/index.tsx b/components/Input/index.tsx new file mode 100644 index 0000000..69f64fa --- /dev/null +++ b/components/Input/index.tsx @@ -0,0 +1,22 @@ +import React, { TextareaHTMLAttributes, ForwardRefRenderFunction } from 'react'; +import { getSystemStyle, SystemProps } from '../utils/systemProps'; +import inputElStyle from '../utils/inputElementStyle'; + +interface InputProps + extends React.InputHTMLAttributes<HTMLInputElement>, + SystemProps +{ } + +const Input: ForwardRefRenderFunction<HTMLInputElement, InputProps> = + ({ style, ...props }, ref) => { + style = { + ...inputElStyle, + ...style, + }; + + const systemStyle = getSystemStyle(props, style); + + return <input ref={ref} style={systemStyle} {...props} />; + }; + +export default React.forwardRef(Input); |
