diff --git a/src/dashboardWebView/components/Common/TextField.tsx b/src/dashboardWebView/components/Common/TextField.tsx new file mode 100644 index 00000000..bfaaec9a --- /dev/null +++ b/src/dashboardWebView/components/Common/TextField.tsx @@ -0,0 +1,78 @@ +import { XCircleIcon } from '@heroicons/react/24/solid'; +import * as React from 'react'; + +export interface ITextFieldProps { + name: string; + value?: string; + placeholder?: string; + icon?: JSX.Element; + disabled?: boolean; + autoFocus?: boolean; + multiline?: boolean; + rows?: number; + onChange?: (value: string) => void; + onReset?: () => void; +} + +export const TextField: React.FunctionComponent = ({ + name, + value, + placeholder, + icon, + autoFocus, + multiline, + rows, + disabled, + onChange, + onReset +}: React.PropsWithChildren) => { + return ( +
+ { + icon && ( +
+ {icon} +
+ ) + } + + { + multiline ? ( +