Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: added logo to sidebar button

Elijah Potterf555b9966618
diff --git a/src/harper/Logo.jsx b/src/harper/Logo.jsx
new file mode 100644
index 000000000..0e6c89f1f
--- /dev/null
+++ b/src/harper/Logo.jsx
@@ -0,0 +1,145 @@
+import * as React from 'react';
+
+export default function Logo() {
+ return (
+ <svg
+ width="100%"
+ height="100%"
+ viewBox="0 0 695 411"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlnsXlink="http://www.w3.org/1999/xlink"
+ xmlSpace="preserve"
+ style={ {
+ fillRule: 'evenodd',
+ clipRule: 'evenodd',
+ strokeLinecap: 'round',
+ strokeLinejoin: 'round',
+ strokeMiterlimit: 1.5,
+ } }
+ fill="#ffffff"
+ >
+ <rect
+ x={ 0 }
+ y={ 0 }
+ fill="#FFFFFF"
+ width={ 695 }
+ height={ 411 }
+ rx={ 15 }
+ />
+ <g transform="matrix(1,0,0,1,-5,-1720)">
+ <g
+ id="Artboard1"
+ transform="matrix(0.824576,0,0,0.749254,0.365685,430.856)"
+ >
+ <rect
+ x={ 5.62 }
+ y={ 1720.57 }
+ width={ 842.425 }
+ height={ 547.24 }
+ style={ {
+ fill: 'none',
+ } }
+ />
+ <g transform="matrix(1.21274,0,0,1.33466,-2183.71,393.157)">
+ <g transform="matrix(1,0,0,1,-22.3927,1.08043)">
+ <path
+ d="M1930.93,1121.75C1930.93,1121.75 1974.66,1080.73 2041.34,1094.1C2086.61,1103.18 2122.83,1145.4 2122.83,1145.4"
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '22.92px',
+ } }
+ />
+ </g>
+ <g transform="matrix(1,0,0,1,-47.3485,12.3935)">
+ <path
+ d="M2250.3,1107.1C2250.3,1107.1 2261.8,1065.58 2311.59,1047.05C2361.62,1028.44 2422.42,1051.13 2422.42,1051.13"
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '22.92px',
+ } }
+ />
+ </g>
+ <g transform="matrix(1.10085,0,0,1.10085,-212.096,-122.054)">
+ <g transform="matrix(1,0,0,1,14.3186,-0.853887)">
+ <ellipse
+ cx={ 1981.62 }
+ cy={ 1247.49 }
+ rx={ 87.401 }
+ ry={ 87.881 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ </g>
+ <rect
+ x={ 2083.34 }
+ y={ 1231.11 }
+ width={ 66.702 }
+ height={ 15.521 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ <rect
+ x={ 1892.23 }
+ y={ 1208.69 }
+ width={ 16.306 }
+ height={ 30.182 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ <g transform="matrix(-1,0,0,1,4281.79,-0.853887)">
+ <ellipse
+ cx={ 1981.62 }
+ cy={ 1247.49 }
+ rx={ 87.401 }
+ ry={ 87.881 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ </g>
+ <g transform="matrix(-1,0,0,1,4296.11,0)">
+ <rect
+ x={ 2083.34 }
+ y={ 1231.11 }
+ width={ 66.702 }
+ height={ 15.521 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ </g>
+ <g transform="matrix(-1,0,0,1,4296.11,0)">
+ <rect
+ x={ 1892.23 }
+ y={ 1208.69 }
+ width={ 16.306 }
+ height={ 30.182 }
+ style={ {
+ fill: 'none',
+ stroke: 'black',
+ strokeWidth: '20.82px',
+ } }
+ />
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </svg>
+ );
+}
diff --git a/src/harper/index.tsx b/src/harper/index.tsx
index 3eb2a033a..a7bf09892 100644
--- a/src/harper/index.tsx
+++ b/src/harper/index.tsx
@@ -1,6 +1,7 @@
import { registerPlugin } from '@wordpress/plugins';
import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/editor';
import SidebarControl from './SidebarControl';
+import Logo from './Logo';
import './index.css';
import React from 'react';
@@ -8,10 +9,10 @@ import React from 'react';
function Sidebar() {
return (
<>
- <PluginSidebarMoreMenuItem target="harper-sidebar">
+ <PluginSidebarMoreMenuItem target="harper-sidebar" icon={ Logo }>
Harper
</PluginSidebarMoreMenuItem>
- <PluginSidebar name="harper-sidebar" title="Harper">
+ <PluginSidebar name="harper-sidebar" title="Harper" icon={ Logo }>
<SidebarControl />
</PluginSidebar>
</>