diff --git a/react/features/base/ui/components/native/Input.tsx b/react/features/base/ui/components/native/Input.tsx index ac0252644..e77715adb 100644 --- a/react/features/base/ui/components/native/Input.tsx +++ b/react/features/base/ui/components/native/Input.tsx @@ -45,11 +45,11 @@ const Input = ({ const handleChange = useCallback((e: NativeSyntheticEvent) => { const { nativeEvent: { text } } = e; - onChange(text); + onChange?.(text); }, []); const clearInput = useCallback(() => { - onChange(''); + onChange?.(''); }, []); const blur = useCallback(() => { diff --git a/react/features/base/ui/components/types.ts b/react/features/base/ui/components/types.ts index 480973ee6..124ea4041 100644 --- a/react/features/base/ui/components/types.ts +++ b/react/features/base/ui/components/types.ts @@ -70,7 +70,7 @@ export interface IInputProps { /** * Change callback. */ - onChange: (value: string) => void; + onChange?: (value: string) => void; /** * The input placeholder text. diff --git a/react/features/base/ui/components/web/Dialog.tsx b/react/features/base/ui/components/web/Dialog.tsx index 6a5c5b446..e4478ffc4 100644 --- a/react/features/base/ui/components/web/Dialog.tsx +++ b/react/features/base/ui/components/web/Dialog.tsx @@ -21,6 +21,8 @@ const useStyles = makeStyles()((theme: Theme) => { width: '100%', height: '100%', position: 'fixed', + color: theme.palette.text01, + ...withPixelLineHeight(theme.typography.bodyLongRegular), top: 0, left: 0, display: 'flex', diff --git a/react/features/base/ui/components/web/Input.tsx b/react/features/base/ui/components/web/Input.tsx index 503744ef3..24299d569 100644 --- a/react/features/base/ui/components/web/Input.tsx +++ b/react/features/base/ui/components/web/Input.tsx @@ -21,6 +21,7 @@ interface IProps extends IInputProps { minRows?: number; name?: string; onKeyPress?: (e: React.KeyboardEvent) => void; + readOnly?: boolean; textarea?: boolean; type?: 'text' | 'email' | 'number' | 'password'; } @@ -147,6 +148,7 @@ const Input = React.forwardRef(({ onChange, onKeyPress, placeholder, + readOnly = false, textarea = false, type = 'text', value @@ -155,9 +157,9 @@ const Input = React.forwardRef(({ const isMobile = isMobileBrowser(); const handleChange = useCallback((e: React.ChangeEvent) => - onChange(e.target.value), []); + onChange?.(e.target.value), []); - const clearInput = useCallback(() => onChange(''), []); + const clearInput = useCallback(() => onChange?.(''), []); return (
@@ -183,6 +185,7 @@ const Input = React.forwardRef(({ onChange = { handleChange } onKeyPress = { onKeyPress } placeholder = { placeholder } + readOnly = { readOnly } ref = { ref } value = { value } /> ) : ( @@ -198,6 +201,7 @@ const Input = React.forwardRef(({ onChange = { handleChange } onKeyPress = { onKeyPress } placeholder = { placeholder } + readOnly = { readOnly } ref = { ref } type = { type } value = { value } /> diff --git a/react/features/embed-meeting/components/EmbedMeetingDialog.tsx b/react/features/embed-meeting/components/EmbedMeetingDialog.tsx index 56cbeee9b..e5ec41114 100644 --- a/react/features/embed-meeting/components/EmbedMeetingDialog.tsx +++ b/react/features/embed-meeting/components/EmbedMeetingDialog.tsx @@ -7,6 +7,7 @@ import CopyButton from '../../base/buttons/CopyButton.web'; import { getInviteURL } from '../../base/connection/functions'; import { translate } from '../../base/i18n/functions'; import Dialog from '../../base/ui/components/web/Dialog'; +import Input from '../../base/ui/components/web/Input'; interface IProps extends WithTranslation { @@ -37,10 +38,10 @@ function EmbedMeeting({ t, url }: IProps) { ok = {{ hidden: true }} titleKey = { 'embedMeeting.title' }>
-