Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix request new connector button #16934

Merged
merged 3 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airbyte-webapp/src/components/base/DropDown/DropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { CSSObjectWithLabel, GroupBase, Props, SelectComponentsConfig, StylesConfig } from "react-select";
import { PortalStyleArgs } from "react-select/dist/declarations/src/components/Menu";
import Select from "react-select/dist/declarations/src/Select";

import { equal, naturalComparatorBy } from "utils/objects";
Expand Down Expand Up @@ -56,8 +57,7 @@ function DropDownInner<T = unknown>(

const styles: StylesConfig = {
...(props.styles ?? {}),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
menuPortal: (base: CSSObjectWithLabel, menuPortalProps: any) => ({
menuPortal: (base: CSSObjectWithLabel, menuPortalProps: PortalStyleArgs) => ({
...(props.styles?.menuPortal?.(base, menuPortalProps) ?? { ...base }),
zIndex: 9999,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useCurrentWorkspace } from "services/workspaces/WorkspacesService";
import ExitIcon from "./components/ExitIcon";

const BottomElement = styled.div`
background: ${(props) => props.theme.greyColro0};
background: ${(props) => props.theme.greyColor0};
padding: 12px 16px 12px;
width: 100%;
min-height: 34px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ import { useDocumentationPanelContext } from "views/Connector/ConnectorDocumenta
import { WarningMessage } from "../WarningMessage";

const BottomElement = styled.div`
background: ${(props) => props.theme.greyColro0};
background: ${({ theme }) => theme.greyColor0};
padding: 6px 16px 8px;
width: 100%;
min-height: 34px;
border-top: 1px solid ${(props) => props.theme.greyColor20};
`;
border-top: 1px solid ${({ theme }) => theme.greyColor20};
position: relative;

const Block = styled.div`
cursor: pointer;
color: ${({ theme }) => theme.textColor};

color: ${({ theme }) => theme.textColor};
&:hover {
color: ${({ theme }) => theme.primaryColor};
}
Expand Down Expand Up @@ -101,10 +100,10 @@ function getOrderForReleaseStage(stage?: ReleaseStage): number {
const ConnectorList: React.FC<React.PropsWithChildren<MenuWithRequestButtonProps>> = ({ children, ...props }) => (
<>
<components.MenuList {...props}>{children}</components.MenuList>
<BottomElement>
<Block onClick={() => props.selectProps.selectProps.onOpenRequestConnectorModal(props.selectProps.inputValue)}>
<FormattedMessage id="connector.requestConnectorBlock" />
</Block>
<BottomElement
onClick={() => props.selectProps.selectProps.onOpenRequestConnectorModal(props.selectProps.inputValue)}
>
<FormattedMessage id="connector.requestConnectorBlock" />
</BottomElement>
</>
);
Expand Down Expand Up @@ -201,8 +200,7 @@ const ConnectorServiceTypeControl: React.FC<ConnectorServiceTypeControlProps> =
}
return naturalComparator(a.label, b.label);
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
[availableServices, orderOverwrite]
[availableConnectorDefinitions, orderOverwrite]
);

const { setDocumentationUrl } = useDocumentationPanelContext();
Expand Down