Skip to content

Commit 6b2aa46

Browse files
LisofffaNi-2
andauthored
feat: fork and publish popups (DAP-4749) (#20)
Co-authored-by: Nikita Teremovskiy <ni-2@mail.ru>
1 parent eacc7cf commit 6b2aa46

File tree

8 files changed

+729
-230
lines changed

8 files changed

+729
-230
lines changed

apps/extension/src/contentscript/multitable-panel/components/input.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,22 @@ interface Props {
3333
value: string
3434
placeholder: string
3535
disabled?: boolean
36-
onChange: (value: string) => void
36+
onChange?: (value: string) => void
37+
readonly?: boolean
3738
}
3839

39-
export const Input: FC<Props> = ({ value, label, placeholder, disabled, onChange }) => {
40+
export const Input: FC<Props> = ({ value, label, placeholder, disabled, onChange, readonly }) => {
4041
const inputId = useId()
4142
return (
4243
<InputContainer>
4344
<FloatingLabel controlId={inputId} label={label} className="mb-3">
4445
<Form.Control
45-
onChange={(e) => onChange(e.target.value)}
46+
onChange={(e) => onChange && onChange(e.target.value)}
4647
value={value}
4748
disabled={disabled}
4849
type="text"
4950
placeholder={placeholder}
51+
readOnly={readonly}
5052
/>
5153
</FloatingLabel>
5254
</InputContainer>

0 commit comments

Comments
 (0)