From 1048734564f0a2ccda0c87c86a1a7b70e9291fad Mon Sep 17 00:00:00 2001 From: vaibhavchobisa Date: Mon, 18 Dec 2023 19:20:58 +0530 Subject: [PATCH 1/3] resolves #26847 --- .../src/Documentation/components/CodeBlock.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/design-system/src/Documentation/components/CodeBlock.tsx b/packages/design-system/src/Documentation/components/CodeBlock.tsx index 3552351f4..40e906ef2 100644 --- a/packages/design-system/src/Documentation/components/CodeBlock.tsx +++ b/packages/design-system/src/Documentation/components/CodeBlock.tsx @@ -1,6 +1,6 @@ import React from "react"; import styled from "styled-components"; -import { Tooltip } from "Tooltip"; +import { Icon } from "Icon"; import { toast } from "Toast"; type CodeBlockProps = { @@ -15,16 +15,14 @@ function CodeBlock({ code }: CodeBlockProps) { toast.show("Copied to clipboard", { kind: "success" }); }} > - - {code} - + {code}  + ); } const Wrapper = styled.div` display: flex; - flex-direction: column; cursor: pointer; padding: 0 4px; border-radius: var(--ads-v2-border-radius); @@ -38,4 +36,4 @@ const Code = styled.div` white-space: pre-wrap; `; -export { CodeBlock }; +export { CodeBlock }; \ No newline at end of file From f8d088480fe961c4a3f672b00bfd50c364d62422 Mon Sep 17 00:00:00 2001 From: vaibhavchobisa Date: Tue, 19 Dec 2023 11:03:29 +0530 Subject: [PATCH 2/3] replaced Icon component with Button component --- .../src/Documentation/components/CodeBlock.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/design-system/src/Documentation/components/CodeBlock.tsx b/packages/design-system/src/Documentation/components/CodeBlock.tsx index 40e906ef2..c7b4a3e00 100644 --- a/packages/design-system/src/Documentation/components/CodeBlock.tsx +++ b/packages/design-system/src/Documentation/components/CodeBlock.tsx @@ -1,6 +1,6 @@ import React from "react"; import styled from "styled-components"; -import { Icon } from "Icon"; +import { Button } from "Button"; import { toast } from "Toast"; type CodeBlockProps = { @@ -15,14 +15,15 @@ function CodeBlock({ code }: CodeBlockProps) { toast.show("Copied to clipboard", { kind: "success" }); }} > - {code}  - + {code} +