From b4d1c9bc64f14971339a691f5d860e5a952f6e8b Mon Sep 17 00:00:00 2001
From: FredKSchott <FredKSchott@users.noreply.github.com>
Date: Mon, 6 Sep 2021 08:25:23 +0000
Subject: [ci] yarn format

---
 docs/src/components/Examples/Codebar.tsx | 69 +++++++++++++++-----------------
 1 file changed, 32 insertions(+), 37 deletions(-)

(limited to 'docs/src/components/Examples/Codebar.tsx')

diff --git a/docs/src/components/Examples/Codebar.tsx b/docs/src/components/Examples/Codebar.tsx
index f2bca6b8d..a1f1117b0 100644
--- a/docs/src/components/Examples/Codebar.tsx
+++ b/docs/src/components/Examples/Codebar.tsx
@@ -1,43 +1,38 @@
 import type { FunctionalComponent } from 'preact';
 import { h, Fragment } from 'preact';
-import{useState,useRef,useEffect} from 'preact/hooks'
+import { useState, useRef, useEffect } from 'preact/hooks';
 
-export type CodeBar ={
-    content:string
-    command:string
-}
-
-const CodeBar:FunctionalComponent=({content,command})=>{
-    const [clicked,setClicked]=useState(false)
-    const [titleTxt,setTitleTxt] = useState("Copy Command to Clipboard")
-    useEffect(()=>{
-        const timeout = setTimeout(()=>{
-            setClicked(false)
-            setTitleTxt("Copy Command to Clipboard")
-        },1500)
-        return ()=> clearTimeout(timeout)
-    },[clicked])
-    /**
-     * 
-     */
-    function onClick(e){
-        setClicked(true)
-        setTitleTxt("Copied to Clipboard!")
-        const titleAttr= e.target
-        const clipboard = navigator.clipboard
-        return clipboard.writeText(`${command}`)
-    }
-
-    return(
-        <div style="cursor:pointer;" onClick={onClick} title={titleTxt} > 
-            <code >
-                {content}
-            </code>
-        </div>
-    )
-}
-
-export default CodeBar
+export type CodeBar = {
+  content: string;
+  command: string;
+};
 
+const CodeBar: FunctionalComponent = ({ content, command }) => {
+  const [clicked, setClicked] = useState(false);
+  const [titleTxt, setTitleTxt] = useState('Copy Command to Clipboard');
+  useEffect(() => {
+    const timeout = setTimeout(() => {
+      setClicked(false);
+      setTitleTxt('Copy Command to Clipboard');
+    }, 1500);
+    return () => clearTimeout(timeout);
+  }, [clicked]);
+  /**
+   *
+   */
+  function onClick(e) {
+    setClicked(true);
+    setTitleTxt('Copied to Clipboard!');
+    const titleAttr = e.target;
+    const clipboard = navigator.clipboard;
+    return clipboard.writeText(`${command}`);
+  }
 
+  return (
+    <div style="cursor:pointer;" onClick={onClick} title={titleTxt}>
+      <code>{content}</code>
+    </div>
+  );
+};
 
+export default CodeBar;
-- 
cgit v1.2.3

