Skip to content

Commit

Permalink
fix(root): update copy code button to use left-icon slot
Browse files Browse the repository at this point in the history
Update copy code button to use left-icon slot and update button docs
  • Loading branch information
GCHQ-Developer-530 committed Oct 3, 2023
1 parent 4e0eb80 commit 5615505
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/CodePreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CodeSnippet: React.FC<{ code: string }> = ({ code }) => (
onClick={() => navigator.clipboard.writeText(code)}
>
Copy code
<SlottedSVG path={mdiContentCopy} slot="icon" />
<SlottedSVG path={mdiContentCopy} slot="left-icon" />
</ic-button>
</ic-tooltip>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/content/structured/components/buttons/code.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
path: "/components/button/code"

date: "2023-02-06"
date: "2023-10-03"

title: "Button"

Expand Down Expand Up @@ -92,7 +92,7 @@ export const snippetsWithIcon = [
language: "Web component",
snippet: `<ic-button variant="primary">
<svg
slot="icon"
slot="left-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -120,7 +120,7 @@ export const snippetsWithIcon = [
language: "React",
snippet: `<IcButton variant="primary">
<SlottedSVG
slot="icon"
slot="left-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -151,7 +151,7 @@ export const snippetsWithIcon = [
<IcButton variant="primary">
Icon button
<svg
slot="icon"
slot="left-icon"
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 0 24 24"
Expand Down

0 comments on commit 5615505

Please sign in to comment.