|
@@ -1,32 +1,10 @@
|
|
|
|
|
|
|
|
-import { useState } from 'react';
|
|
|
|
|
|
|
+import React, { useState } from 'react';
|
|
|
|
|
|
|
|
import Link from 'next/link';
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
import styles from './PluginCard.module.scss';
|
|
import styles from './PluginCard.module.scss';
|
|
|
|
|
|
|
|
-const PluginCardButton = ({ onChange }: any): JSX.Element => {
|
|
|
|
|
- const [isEnabled, setIsEnabled] = useState(true);
|
|
|
|
|
-
|
|
|
|
|
- return (
|
|
|
|
|
- <div className={`${styles.plugin_card}`}>
|
|
|
|
|
- <div className="switch">
|
|
|
|
|
- <label className="switch__label">
|
|
|
|
|
- <input
|
|
|
|
|
- type="checkbox"
|
|
|
|
|
- className="switch__input"
|
|
|
|
|
- onChange={() => setIsEnabled(!isEnabled)}
|
|
|
|
|
- checked={isEnabled}
|
|
|
|
|
- />
|
|
|
|
|
- <span className="switch__content"></span>
|
|
|
|
|
- <span className="switch__circle"></span>
|
|
|
|
|
- </label>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- );
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
name: string,
|
|
name: string,
|
|
|
url: string,
|
|
url: string,
|
|
@@ -38,6 +16,27 @@ export const PluginCard = (props: Props): JSX.Element => {
|
|
|
name, url, description,
|
|
name, url, description,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
+ const PluginCardButton = (): JSX.Element => {
|
|
|
|
|
+ const [isEnabled, setIsEnabled] = useState(true);
|
|
|
|
|
+
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className={`${styles.plugin_card}`}>
|
|
|
|
|
+ <div className="switch">
|
|
|
|
|
+ <label className="switch__label">
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="checkbox"
|
|
|
|
|
+ className="switch__input"
|
|
|
|
|
+ onChange={() => setIsEnabled(!isEnabled)}
|
|
|
|
|
+ checked={isEnabled}
|
|
|
|
|
+ />
|
|
|
|
|
+ <span className="switch__content"></span>
|
|
|
|
|
+ <span className="switch__circle"></span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ );
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<div className="card shadow border-0" key={name}>
|
|
<div className="card shadow border-0" key={name}>
|
|
|
<div className="card-body px-5 py-4 mt-3">
|
|
<div className="card-body px-5 py-4 mt-3">
|