add button component. tsconfig for json imports

pull/1344/head
joseph izang 3 years ago
parent 81e1ebe7c1
commit 856838ba55
  1. 23
      libs/remix-ui/plugin-manager/src/lib/components/button.tsx
  2. 16
      libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
  3. 3
      libs/remix-ui/plugin-manager/tsconfig.json

@ -0,0 +1,23 @@
import React, { useState } from 'react'
interface ButtonProps {
profileName: string
deactivatePlugin?: (name: string) => {}
activatePlugin?: (name: string) => {}
buttonText?: string
}
function Button ({ profileName, deactivatePlugin, buttonText }: ButtonProps) {
const [isActive, toggleIsActive] = useState(false)
const dataId = `pluginManagerComponentDeactivateButton${profileName}`
return (
<button
onClick={() => deactivatePlugin(profileName)}
className="btn btn-secondary btn-sm"
data-id={dataId}
>
{buttonText}
</button>
)
}

@ -1,9 +1,21 @@
import React from 'react';
import React from 'react'
import * as packageJson from '../../../../../package.json'
import './remix-ui-plugin-manager.css';
/* eslint-disable-next-line */
export interface RemixUiPluginManagerProps {}
export interface RemixUiPluginManagerProps {
name: 'pluginManager',
displayName: 'Plugin manager',
methods: [],
events: [],
icon: 'assets/img/pluginManager.webp',
description: 'Start/stop services, modules and plugins',
kind: 'settings',
location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/plugin_manager.html',
version: packageJson.version
}
export const RemixUiPluginManager = (props: RemixUiPluginManagerProps) => {
return (

@ -4,7 +4,8 @@
"jsx": "react",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true
},
"files": [],
"include": [],

Loading…
Cancel
Save