View on GitHub
File Changes
      return THEMES.YOROI_CLASSIC;
    }

                      
-
    if (environment.isShelley()) {
-
      return THEMES.YOROI_SHELLEY_TESTNET;
-
    }
-

                      
    const { result } = this.getThemeRequest.execute();
    if (this.isCurrentThemeSet && result != null) {
      // verify content is an actual theme
  }

                      
  @computed get isShelleyTestnetTheme(): boolean {
-
    return this.currentTheme === THEMES.YOROI_SHELLEY_TESTNET;
+
    return environment.isShelley();
  }

                      
  /* @Returns Merged Pre-Built Theme and Custom Theme */
export const THEMES = Object.freeze({
  YOROI_CLASSIC: 'YoroiClassic',
  YOROI_MODERN: 'YoroiModern',
-
  YOROI_SHELLEY_TESTNET: 'YoroiShelleyTestnet',
});

                      
export type Theme = $Values<typeof THEMES>;
        [SELECT]: SelectOverridesClassic,
        [SWITCH]: SwitchOverridesClassic,
      });
-
    case THEMES.YOROI_SHELLEY_TESTNET:
    case THEMES.YOROI_MODERN:
      return ({
        [AUTOCOMPLETE]: AutocompleteOverrides,
// @flow
//  ==== Theme: Yoroi Modern === //
-

                      
+
import environment from '../../environment';
import common from './Common';

                      
// FONTS
  left: 40,
};

                      
-
export default {
+
const YoroiModern = {
  // COMMON-THEME-INDEPENDENT
  ...common,

                      

                      
  '--theme-warning-color': `#FF1351`,
};
+

                      
+
// *************************************************************
+
// Here we are overriding YoroiModern theme for Shelley Testnet
+
// Creating a new theme is costly because not only color
+
// changes but layout is different in different theme.
+
// e.g for new theme we need to override :global(.NewTheme)
+
// is needed in UI style files or :global(.OldTheme, .NewTheme)
+
// *************************************************************
+
let ShelleyTestnetOverrides = {};
+
if (environment.isShelley()) {
+
  ShelleyTestnetOverrides = {
+
    // Toolbar
+
    '--theme-topbar-background-color': 'linear-gradient(225deg, #F14D78 0%, #1A44B7 100%)',
+
    // Button
+
    '--theme-button-primary-background-color': 'linear-gradient(224.33deg, #3154CB 0%, #2048BD 100%)',
+
    '--theme-button-primary-background-color-hover': '#4e70e6',  // TODO: fix color
+
    '--theme-button-primary-background-color-active': '#1A44B7', // TODO: fix color
+
    '--theme-button-primary-background-color-disabled': 'rgba(49,84,203,0.35)',
+
  };
+
}
+

                      
+
export default Object.assign(YoroiModern, ShelleyTestnetOverrides);
-
// @flow
-
//  ==== Theme: Yoroi Shelley Testnet === //
-

                      
-
// Using YoroiModern as base for YoroiShelleyTestnet theme
-
import YoroiShelleyTestnet from './YoroiModern';
-

                      
-
// Here you can override or add new key-value pair
-
const overrides = {
-
  // Toolbar
-
  '--theme-topbar-background-color': 'linear-gradient(225deg, #F14D78 0%, #1A44B7 100%)',
-
  // Button
-
  '--theme-button-primary-background-color': 'linear-gradient(224.33deg, #3154CB 0%, #2048BD 100%)',
-
  '--theme-button-primary-background-color-hover': '#4e70e6',  // TODO: fix color
-
  '--theme-button-primary-background-color-active': '#1A44B7', // TODO: fix color
-
  '--theme-button-primary-background-color-disabled': 'rgba(49,84,203,0.35)',
-
};
-

                      
-
export default Object.assign(YoroiShelleyTestnet, overrides);