Esempio n. 1
0
const getStyle = (theme) => {
    let rjv_theme = rjv_default;
    if (theme === false || theme === 'none') {
        rjv_theme = rjv_grey;
    }

    return createStyling(
        getDefaultThemeStyling,
        {defaultBase16: rjv_theme}
    )(theme);
}
  rightSliderShown: {
    transform: 'translateX(0)',
  },

  rightSliderRotateShown: {
    transform: 'rotateX(0)',
    transition: 'transform 0.2s ease-in-out 0.18s'
  }
});

let themeSheet;

const getDefaultThemeStyling = theme => {
  if (themeSheet) {
    themeSheet.detach();
  }

  themeSheet = jss.createStyleSheet(
    getSheetFromColorMap(colorMap(theme))
  ).attach();

  return themeSheet.classes;
};

export const base16Themes = { ...reduxThemes, ...inspectorThemes };

export const createStylingFromTheme = createStyling(getDefaultThemeStyling, {
  defaultBase16: inspector,
  base16Themes
});
Esempio n. 3
0
})

// the default theme until i figure out how to customize it on the fly
// http://chriskempson.github.io/base16/
// const defaultTheme = 'atliersavanah'
// const defaultTheme = 'ocean'
// const defaultTheme = 'mocha'
// const defaultTheme = 'railscasts'
// const defaultTheme = 'greenscreen'
const defaultTheme = "twilight"

// the natural or inverted look
const invertTheme = false

// some kind of wierd factory?
const createStylingFromTheme = createStyling(getStylingFromBase16, {})

// here's where I think i should be allowing user customization?
const styling = createStylingFromTheme(defaultTheme)

// fish out the roles because I haven't committed fully to styling in the components just yet
const roles = styling("roles").style

// awkwardly expose the theme for the ObjectTree component
const theme = styling("theme").style

export default {
  ...roles,
  theme,
  invertTheme,
}