diff --git a/src/components/boris/BorisSuperpowers/index.tsx b/src/components/boris/BorisSuperpowers/index.tsx index c2cc8821..cf2530cb 100644 --- a/src/components/boris/BorisSuperpowers/index.tsx +++ b/src/components/boris/BorisSuperpowers/index.tsx @@ -19,7 +19,7 @@ const BorisSuperpowers: FC = ({ active, onChange }) => { return (
- +
diff --git a/src/components/editors/EditorPublicSwitch/index.tsx b/src/components/editors/EditorPublicSwitch/index.tsx index 3cb59e81..71c1fef2 100644 --- a/src/components/editors/EditorPublicSwitch/index.tsx +++ b/src/components/editors/EditorPublicSwitch/index.tsx @@ -1,7 +1,8 @@ -import React, { FC, useCallback, useEffect, useRef } from 'react'; +import React, { FC, useCallback } from 'react'; import { IEditorComponentProps } from '~/redux/node/types'; -import { usePopper } from 'react-popper'; import { Button } from '~/components/input/Button'; +import { Icon } from '~/components/input/Icon'; +import styles from './styles.module.scss'; import { Superpower } from '~/components/boris/Superpower'; interface IProps extends IEditorComponentProps {} @@ -15,9 +16,8 @@ const EditorPublicSwitch: FC = ({ data, setData }) => { return ( ); }; diff --git a/src/components/input/Toggle/index.tsx b/src/components/input/Toggle/index.tsx index 7be2aaa9..f36ee358 100644 --- a/src/components/input/Toggle/index.tsx +++ b/src/components/input/Toggle/index.tsx @@ -2,12 +2,15 @@ import React, { FC, useCallback } from 'react'; import styles from './styles.module.scss'; import classNames from 'classnames'; +type ToggleColor = 'primary' | 'secondary' | 'lab' | 'danger'; + interface IProps { value?: boolean; handler?: (val: boolean) => void; + color?: ToggleColor; } -const Toggle: FC = ({ value, handler }) => { +const Toggle: FC = ({ value, handler, color = 'primary' }) => { const onClick = useCallback(() => { if (!handler) { return; @@ -19,7 +22,7 @@ const Toggle: FC = ({ value, handler }) => { return (
- - - {user.is_user && } + { + + - {node.is_loading_comments ? ( - - ) : ( - - )} - - -