MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / handlePreferencesChange

Function handlePreferencesChange

apps/plugin/ui-src/App.tsx:147–156  ·  view source on GitHub ↗
(
    key: keyof PluginSettings,
    value: PluginSettings[keyof PluginSettings],
  )

Source from the content-addressed store, hash-verified

145 }
146 };
147 const handlePreferencesChange = (
148 key: keyof PluginSettings,
149 value: PluginSettings[keyof PluginSettings],
150 ) => {
151 if (state.settings && state.settings[key] === value) {
152 // do nothing
153 } else {
154 postUISettingsChangingMessage(key, value, { targetOrigin: "*" });
155 }
156 };
157
158 const darkMode = isDarkFigmaBackground(figmaColorBgValue);
159

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected