From 251b59c53cb0e84898b1d266f4018302324da46f Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Sat, 12 Sep 2020 17:01:27 -0400 Subject: [PATCH] InfoPanel: add code snippet for Vue library We now generate snippets for the phosphor-vue in addition to HTML and React libraries. The panel interface may be getting a bit too cluttered, and we should consider a redesign in the future. --- src/components/IconGrid/InfoPanel.tsx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/IconGrid/InfoPanel.tsx b/src/components/IconGrid/InfoPanel.tsx index b411952..8380e41 100644 --- a/src/components/IconGrid/InfoPanel.tsx +++ b/src/components/IconGrid/InfoPanel.tsx @@ -15,7 +15,7 @@ import useTransientState from "../../hooks/useTransientState"; const infoVariants = { open: { opacity: 1, - height: 396, + height: 496, margin: 4, // transition: { stiffness: 600, damping: 32, duration: 0.2 }, }, @@ -51,11 +51,14 @@ const InfoPanel: React.FC = (props) => { react: `<${Icon.displayName} size={${size}} ${ color !== "#000000" ? `color="${color}" ` : "" }${weight === "regular" ? "" : `weight="${weight}" `}/>`, + vue: `` }; const handleCopySnippet = ( event: React.MouseEvent, - type: "html" | "react" + type: "html" | "react" | "vue" ) => { event.currentTarget.blur(); setCopied(type); @@ -131,6 +134,22 @@ const InfoPanel: React.FC = (props) => { +
+ Vue +
+            {snippets.vue}
+            
+          
+