summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-09-03 08:18:02 +0200
committerTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-09-30 09:51:49 +0200
commit27b26dab3374af07780543eb9b652111c2006ec5 (patch)
treeb074e66b7f1fb983f60281d1661759c33dbc2e05
parent9bd09c08de701732b212be4d7d85edb51883a3e8 (diff)
downloadmullvadvpn-27b26dab3374af07780543eb9b652111c2006ec5.tar.xz
mullvadvpn-27b26dab3374af07780543eb9b652111c2006ec5.zip
Allow ProxyFormNameField to pass props to SettingsTextInput
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/ProxyForm.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/ProxyForm.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/ProxyForm.tsx
index b687201f45..c800e3bfff 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/components/ProxyForm.tsx
+++ b/desktop/packages/mullvad-vpn/src/renderer/components/ProxyForm.tsx
@@ -19,7 +19,11 @@ import { SettingsGroup } from './cell/SettingsGroup';
import { SettingsRadioGroup } from './cell/SettingsRadioGroup';
import { SettingsRow } from './cell/SettingsRow';
import { SettingsSelect, SettingsSelectItem } from './cell/SettingsSelect';
-import { SettingsNumberInput, SettingsTextInput } from './cell/SettingsTextInput';
+import {
+ SettingsNumberInput,
+ SettingsTextInput,
+ SettingsTextInputProps,
+} from './cell/SettingsTextInput';
interface ProxyFormContext {
proxy?: CustomProxy;
@@ -133,7 +137,11 @@ export function NamedProxyForm(props: NamedProxyFormContainerProps) {
);
}
-function ProxyFormNameField() {
+type ProxyFormNameFieldProps = {
+ inputProps?: Partial<SettingsTextInputProps>;
+};
+
+function ProxyFormNameField(props: ProxyFormNameFieldProps) {
const { name, setName } = useContext(namedProxyFormContext);
return (
@@ -143,6 +151,7 @@ function ProxyFormNameField() {
defaultValue={name}
placeholder={messages.pgettext('api-access-methods-view', 'Enter name')}
onUpdate={setName}
+ {...props?.inputProps}
/>
</SettingsRow>
</SettingsGroup>