|
|
@ -1,7 +1,7 @@ |
|
|
|
/* eslint-disable no-use-before-define */ |
|
|
|
/* eslint-disable no-use-before-define */ |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
import { VerticalIcons } from 'libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel' |
|
|
|
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 { Chevron } from './Chevron' |
|
|
|
import Icon from './Icon' |
|
|
|
import Icon from './Icon' |
|
|
|
|
|
|
|
|
|
|
@ -11,9 +11,16 @@ interface SettingsProps { |
|
|
|
addActive: (name: string) => void |
|
|
|
addActive: (name: string) => void |
|
|
|
removeActive: () => void |
|
|
|
removeActive: () => void |
|
|
|
scrollableRef: React.MutableRefObject<any> |
|
|
|
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 ( |
|
|
|
return ( |
|
|
|
<div id="settingsIcons" data-id="vertialIconsSettingsIcons"> |
|
|
|
<div id="settingsIcons" data-id="vertialIconsSettingsIcons"> |
|
|
|
<Chevron |
|
|
|
<Chevron |
|
|
|