diff --git a/apps/remix-ide/src/app/components/plugin-manager-component.js b/apps/remix-ide/src/app/components/plugin-manager-component.js index 34ddc8ee5e..9893496535 100644 --- a/apps/remix-ide/src/app/components/plugin-manager-component.js +++ b/apps/remix-ide/src/app/components/plugin-manager-component.js @@ -53,7 +53,7 @@ const css = csjs` } .isStuck { background-color: var(--primary); - color: + color: } .versionWarning { padding: 4px; @@ -146,22 +146,22 @@ class PluginManagerComponent extends ViewPlugin { ` return yo` -
-
-
-
- ${displayName} - ${doclink} - ${versionWarning} -
- ${activationButton} -
+
+
+
+
+ ${displayName} + ${doclink} + ${versionWarning}
-
- - ${profile.description} -
-
+ ${activationButton} + +
+
+ + ${profile.description} +
+
` } diff --git a/libs/remix-ui/plugin-manager/src/customTypes.ts b/libs/remix-ui/plugin-manager/src/customTypes.ts new file mode 100644 index 0000000000..e696caeb52 --- /dev/null +++ b/libs/remix-ui/plugin-manager/src/customTypes.ts @@ -0,0 +1,7 @@ +export type PluginManagerSettings = { + openDialog: () => void + onValidation: () => void + clearPermission: (from: any, to: any, method: any) => void + settings: () => HTMLElement + render: () => HTMLElement +} diff --git a/libs/remix-ui/plugin-manager/src/lib/components/activeTile.tsx b/libs/remix-ui/plugin-manager/src/lib/components/activeTile.tsx new file mode 100644 index 0000000000..f2a8a0050a --- /dev/null +++ b/libs/remix-ui/plugin-manager/src/lib/components/activeTile.tsx @@ -0,0 +1,24 @@ +import React from 'react' + +type tileLabel = { + label: 'Active Module' | 'Inactive Modules' +} + +interface ActiveTileProps { + inactivesCount?: number + activesCount?: number + tileLabel?: tileLabel +} + +function ActiveTile ({ inactivesCount, activesCount, tileLabel }: ActiveTileProps) { + return ( + + ) +} + +export default ActiveTile diff --git a/libs/remix-ui/plugin-manager/src/lib/components/button.tsx b/libs/remix-ui/plugin-manager/src/lib/components/button.tsx index 29a81e8baf..10cb650379 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/button.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/button.tsx @@ -1,14 +1,14 @@ -import React, { useState } from 'react' +import React from 'react' interface ButtonProps { profileName: string deactivatePlugin?: (name: string) => {} activatePlugin?: (name: string) => {} + isActive: boolean buttonText?: string } function Button ({ profileName, deactivatePlugin, buttonText }: ButtonProps) { - const [isActive, toggleIsActive] = useState(false) const dataId = `pluginManagerComponentDeactivateButton${profileName}` return ( @@ -21,3 +21,4 @@ function Button ({ profileName, deactivatePlugin, buttonText }: ButtonProps) { ) } +export default Button diff --git a/libs/remix-ui/plugin-manager/src/lib/components/pluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/pluginCard.tsx new file mode 100644 index 0000000000..ede66729e2 --- /dev/null +++ b/libs/remix-ui/plugin-manager/src/lib/components/pluginCard.tsx @@ -0,0 +1,45 @@ +import React from 'react' +import '../remix-ui-plugin-manager.css' +import '' +import Button from './button' +interface PluginCardProps { + profileName: string + displayName: string + docLink: string + versionWarning: string + profileIcon: string + profileDescription: string +} + +function PluginCard ({ + profileName, + displayName, + docLink, + versionWarning, + profileIcon, + profileDescription +}: PluginCardProps) { + return ( +
+
+
+
+ {displayName} + {docLink} + {versionWarning} +
+
+
+
+ profile icon + {profileDescription} +
+
+ ) +} + +export default PluginCard diff --git a/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx new file mode 100644 index 0000000000..1ffcb603d4 --- /dev/null +++ b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx @@ -0,0 +1,11 @@ +import React from 'react' + +function RootView () { + return ( +
+
+
+ ) +} + +export default RootView diff --git a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx index 5840946adb..ca52b183e0 100644 --- a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx @@ -1,5 +1,4 @@ import React from 'react' -import * as packageJson from '../../../../../package.json' import './remix-ui-plugin-manager.css'; @@ -14,7 +13,7 @@ export interface RemixUiPluginManagerProps { kind: 'settings', location: 'sidePanel', documentation: 'https://remix-ide.readthedocs.io/en/latest/plugin_manager.html', - version: packageJson.version + version: string } export const RemixUiPluginManager = (props: RemixUiPluginManagerProps) => { diff --git a/libs/remix-ui/plugin-manager/src/types.d.ts b/libs/remix-ui/plugin-manager/src/types.d.ts new file mode 100644 index 0000000000..2014ac099b --- /dev/null +++ b/libs/remix-ui/plugin-manager/src/types.d.ts @@ -0,0 +1,19 @@ +/* eslint-disable camelcase */ + +declare module 'yo-yo'{ + interface yo_yo { + (strings:string[], ...values:any[]):HTMLElement; + update(element:HTMLElement, element2:HTMLElement); + } + var yo:yo_yo + export = yo; +} + +declare module 'dom-css'{ + interface dom_css{ + (element:HTMLElement, css:any):void; + } + + var css:dom_css + export = css; +}