From 02c80964423c60cbe14f12be6a07c0217b57d243 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Mon, 19 Dec 2022 18:15:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=9F=F0=9F=8E=89=20Add=20copy=20stream?= =?UTF-8?q?=20button=20(#20577)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add copy stream button * review comments --- .../Builder/AddStreamButton.tsx | 28 ++++++++++++------- .../Builder/StreamConfigView.module.scss | 15 +++++++--- .../Builder/StreamConfigView.tsx | 18 ++++++++++-- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/airbyte-webapp/src/components/connectorBuilder/Builder/AddStreamButton.tsx b/airbyte-webapp/src/components/connectorBuilder/Builder/AddStreamButton.tsx index 274ca47e84d0..6a368fa5b319 100644 --- a/airbyte-webapp/src/components/connectorBuilder/Builder/AddStreamButton.tsx +++ b/airbyte-webapp/src/components/connectorBuilder/Builder/AddStreamButton.tsx @@ -1,5 +1,6 @@ import { Form, Formik, useField } from "formik"; import { useState } from "react"; +import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { Button } from "components/ui/Button"; @@ -19,23 +20,29 @@ interface AddStreamValues { interface AddStreamButtonProps { onAddStream: (addedStreamNum: number) => void; + button?: React.ReactElement; + initialValues?: Partial; } -export const AddStreamButton: React.FC = ({ onAddStream }) => { +export const AddStreamButton: React.FC = ({ onAddStream, button, initialValues }) => { const { formatMessage } = useIntl(); const [isOpen, setIsOpen] = useState(false); const [streamsField, , helpers] = useField("streams"); const numStreams = streamsField.value.length; + const buttonClickHandler = () => { + setIsOpen(true); + }; + return ( <> - + } + /> +