Settings
Settings component used for your plugin settings config
Plugin config
import { Plugin } from '@root'
const {
GUI
} = Plugin
class Settings extends Plugin.Settings {
plugin() {
return(
<>
<GUI.ConfigInput
name={'username'}
ref={refs => this.handleRefs(refs, 'username')}
/>
<GUI.ConfigPassword
name={'password'}
ref={refs => this.handleRefs(refs, 'password')}
/>
</>
)
}
}
export {
Settings
}
You can access your plugin config from Dashboard main components withprops.config.username && props.config.password
Or with Plugin.useConfig() hook
useConfigApplication config
import { Plugin } from '@root'
const {
GUI
} = Plugin
class Settings extends Plugin.Settings {
application() {
return(
<GUI.ConfigInput
name={'title'}
ref={refs => this.handleRefs(refs, 'applicationTitle')}
/>
)
}
}
export {
Settings
}
You can access your plugin config from Dashboard main components withprops.config.applicationTitle
Or with Plugin.useApplicationConfig() hook
Last updated
Was this helpful?