first commit.
This commit is contained in:
29
src/common/ui/KintonePluginInputText.tsx
Normal file
29
src/common/ui/KintonePluginInputText.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
|
||||
import clsx from 'clsx';
|
||||
|
||||
export type KintonePluginInputTextProps = {
|
||||
className?: string;
|
||||
value: string;
|
||||
disabled?: boolean;
|
||||
onChange: (value: string) => void;
|
||||
};
|
||||
|
||||
const KintonePluginInputText: React.FC<KintonePluginInputTextProps> = (props) => {
|
||||
const { className, value, disabled, onChange } = props;
|
||||
const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {
|
||||
onChange(e.target.value);
|
||||
};
|
||||
return (
|
||||
<div className={clsx('kintoneplugin-input-outer', className)}>
|
||||
<input
|
||||
className="kintoneplugin-input-text"
|
||||
type="text"
|
||||
value={value}
|
||||
disabled={disabled}
|
||||
onChange={handleOnChange}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default KintonePluginInputText;
|
||||
Reference in New Issue
Block a user