|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
/* eslint-disable no-use-before-define */ |
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
|
import { VerticalIcons } from 'libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel' |
|
|
|
|
import React from 'react' |
|
|
|
|
import React, { useEffect } from 'react' |
|
|
|
|
import { Chevron } from './Chevron' |
|
|
|
|
import Icon from './Icon' |
|
|
|
|
|
|
|
|
@ -11,9 +11,16 @@ interface SettingsProps { |
|
|
|
|
addActive: (name: string) => void |
|
|
|
|
removeActive: () => void |
|
|
|
|
scrollableRef: React.MutableRefObject<any> |
|
|
|
|
onThemeChanged: (themeType: any) => void |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function Settings ({ scrollableRef, verticalIconsPlugin, itemContextAction, addActive, removeActive }: SettingsProps) { |
|
|
|
|
function Settings ({ scrollableRef, verticalIconsPlugin, itemContextAction, addActive, removeActive, onThemeChanged }: SettingsProps) { |
|
|
|
|
useEffect(() => { |
|
|
|
|
const themeModule = verticalIconsPlugin.registry.get('themeModule').api |
|
|
|
|
themeModule.events.on('themeChanged', (theme: any) => { |
|
|
|
|
onThemeChanged(theme.quality) |
|
|
|
|
}) |
|
|
|
|
}, [onThemeChanged]) |
|
|
|
|
return ( |
|
|
|
|
<div id="settingsIcons" data-id="vertialIconsSettingsIcons"> |
|
|
|
|
<Chevron |
|
|
|
|