Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into publish
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketkatkar97 committed Feb 28, 2024
2 parents 1890dde + a4604c1 commit 0cf06b9
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
margin: 32px 0px;
display:flex;
flex-direction: column;
gap: 12px
gap: 6px
}

.Heading{
Expand Down Expand Up @@ -39,8 +39,24 @@
border-radius: 28px;
}

<<<<<<< HEAD
.SubHeading{
display: flex;
=======
.FeaturesHeading{
font-size: 14px;
color: var(--gray-text-color);
}

.SubHeading{
display: flex;
flex-direction: column;
gap: 8px;
}

.FeaturesList{
display: flex;
>>>>>>> origin/main
flex-wrap: wrap;
gap: 12px;
}
Expand All @@ -50,6 +66,12 @@
font-size: 12px;
border-radius: 14px;
width: fit-content;
<<<<<<< HEAD
=======
display: flex;
align-items: center;
gap: 4px
>>>>>>> origin/main
}

.AvailableFeature{
Expand Down
42 changes: 26 additions & 16 deletions components/ConnectorDetailsHeader/ConnectorDetailsHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import classNames from "classnames";
import { ReactComponent as CheckIcon } from "../../images/icons/check.svg";
import { ReactComponent as CrossIcon } from "../../images/icons/cross.svg";
import {
getConnectorImage,
getConnectorPlatformIcon,
Expand Down Expand Up @@ -30,22 +32,30 @@ function ConnectorDetailsHeader({
</div>
</div>
<div className={styles.SubHeading}>
{availableFeatures.map((feature) => (
<div
className={classNames(styles.FeatureTag, styles.AvailableFeature)}
key={feature}
>
{feature}
</div>
))}
{unavailableFeatures.map((feature) => (
<div
className={classNames(styles.FeatureTag, styles.UnavailableFeature)}
key={feature}
>
{feature}
</div>
))}
<div className={styles.FeaturesHeading}>Feature List</div>
<div className={styles.FeaturesList}>
{availableFeatures.map((feature) => (
<div
className={classNames(styles.FeatureTag, styles.AvailableFeature)}
key={feature}
>
{feature}
<CheckIcon height={12} />
</div>
))}
{unavailableFeatures.map((feature) => (
<div
className={classNames(
styles.FeatureTag,
styles.UnavailableFeature
)}
key={feature}
>
{feature}
<CrossIcon height={14} />
</div>
))}
</div>
</div>
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions components/ConnectorsInfo/ConnectorsInfo.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const CONNECTORS: Array<ConnectorCategory> = [
icon: "./images/connectors/bigquery.png",
name: "BigQuery",
},
{
url: "/connectors/database/bigtable",
icon: "./images/connectors/big-table.png",
name: "BigTable",
supportedVersion: "v1.3.x",
},
{
url: "/connectors/database/clickhouse",
icon: "./images/connectors/clickhouse.png",
Expand Down
5 changes: 3 additions & 2 deletions components/common/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import React from "react";
import { ReactComponent as CheckIcon } from "../../../images/icons/check.svg";
import { ReactComponent as CrossIcon } from "../../../images/icons/cross.svg";

function Icon({ iconName }: { iconName: string }) {
let IconComponent: SvgComponent;
let iconColor = "currentColor";

switch (iconName) {
case "check":
IconComponent = CheckIcon;
break;
case "cross":
IconComponent = CrossIcon;
iconColor = "#CB2431";
break;
default:
return <></>;
}

return <IconComponent />;
return <IconComponent height={16} color={iconColor} />;
}

export default Icon;
8 changes: 8 additions & 0 deletions components/common/Youtube/Youtube.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface YouTubeProps {
className?: string;
videoId: string;
start?: string;
end?: string;
height?: string;
width?: string;
}
7 changes: 4 additions & 3 deletions components/common/Youtube/Youtube.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.IframeContainer {
position: relative;
margin-top: 16px;
.Container{
display: flex;
justify-content: center;
margin: 32px 0px;
}

.Iframe {
Expand Down
63 changes: 16 additions & 47 deletions components/common/Youtube/Youtube.tsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,28 @@
import classNames from "classnames";
import { YouTubeProps } from "./Youtube.interface";
import styles from "./Youtube.module.css";

interface YouTubeProps {
videoId: string;
start?: string;
end?: string;
caption?: string;
height?: string;
width?: string;
}

const YouTube = ({
caption = "",
className = "",
videoId,
start = "",
end = "",
height,
width,
}: YouTubeProps) => {
let YouTubeBlock;

if (caption) {
YouTubeBlock = (
<section className={styles.Container}>
<section className={styles.IframeContainer}>
<iframe
allowFullScreen
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
className={styles.Iframe}
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
style={{ height, width }}
></iframe>
</section>
<section className={styles.CaptionContainer}>
<p className={styles.Caption}>{caption}</p>
</section>
</section>
);
} else {
YouTubeBlock = (
<section className={styles.IframeContainer} style={{ height, width }}>
<iframe
allowFullScreen
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
className={styles.Iframe}
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
style={{ height, width }}
></iframe>
</section>
);
}
return YouTubeBlock;
return (
<div className={classNames(styles.Container, className)}>
<iframe
allowFullScreen
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
className={styles.Iframe}
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
style={{ height, width }}
></iframe>
</div>
);
};

export default YouTube;
2 changes: 1 addition & 1 deletion images/icons/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions images/icons/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion markdoc/tags/youtube.markdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const youtube = {
render: "YouTube",
description: "Display youtube videos",
attributes: {
caption: {
className: {
type: String,
},
videoId: {
Expand Down
12 changes: 9 additions & 3 deletions utils/ConnectorsUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,31 @@ export const getConnectorImage = (connector: string) => {
break;

case "S3":
case "Data lake":
case "Datalake":
iconSource = "amazon-s3";
break;

case "Azure SQL":
case "AzureSQL":
iconSource = "azuresql";
break;

case "BigQuery":
iconSource = "bigquery";
break;

case "ClickHouse":
case "BigTable":
iconSource = "big-table";
break;

case "Clickhouse":
iconSource = "clickhouse";
break;

case "Couchbase":
iconSource = "couchbase";
break;

case "Databricks":
case "Databricks SQL":
case "Unity Catalog":
case "Databricks Pipeline":
Expand All @@ -107,6 +112,7 @@ export const getConnectorImage = (connector: string) => {
iconSource = "delta-lake";
break;

case "Domo":
case "Domo Database":
case "Domo Dashboard":
case "Domo Pipeline":
Expand Down

0 comments on commit 0cf06b9

Please sign in to comment.