Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #685 from vaibhavchobisa/feat/added-copy-button-in…
Browse files Browse the repository at this point in the history
…-category-token-table-instead-of-tooltip

feat: replaced tooltip with copy button
  • Loading branch information
albinAppsmith authored Dec 19, 2023
2 parents 16fad3f + b01ab25 commit 1880aa1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-horses-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@appsmithorg/design-system": patch
---

feat: replaced tooltip with copy button in category token documentation
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import { Tooltip } from "Tooltip";
import { Button } from "Button";
import { toast } from "Toast";

type CodeBlockProps = {
Expand All @@ -15,16 +15,15 @@ function CodeBlock({ code }: CodeBlockProps) {
toast.show("Copied to clipboard", { kind: "success" });
}}
>
<Tooltip content="Click here to copy" mouseEnterDelay={0.7}>
<Code>{code}</Code>
</Tooltip>
<Code>{code}</Code>
<Button startIcon="copy-control" kind="tertiary" />
</Wrapper>
);
}

const Wrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
padding: 0 4px;
border-radius: var(--ads-v2-border-radius);
Expand Down

0 comments on commit 1880aa1

Please sign in to comment.