From: Michal Klobukowski Date: Thu, 27 Dec 2018 14:56:06 +0000 (+0100) Subject: Create SwitchField component X-Git-Tag: 1.4.0~76^2~4 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/b02573dbdd8dae7c2f9bdafa2f6ac847168b024a Create SwitchField component Feature #13708 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- diff --git a/src/components/switch-field/switch-field.tsx b/src/components/switch-field/switch-field.tsx new file mode 100644 index 00000000..4541e371 --- /dev/null +++ b/src/components/switch-field/switch-field.tsx @@ -0,0 +1,14 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +import * as React from 'react'; +import { FormFieldProps, FormField } from '~/components/form-field/form-field'; +import { Switch } from '@material-ui/core'; +import { SwitchProps } from '@material-ui/core/Switch'; + +export const SwitchField = ({ switchProps, ...props }: FormFieldProps & { switchProps: SwitchProps }) => + + {input => } + ; +