How to use the @pluralsight/ps-design-system-theme.defaultName function in @pluralsight/ps-design-system-theme

To help you get started, we’ve selected a few @pluralsight/ps-design-system-theme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pluralsight / design-system / packages / site / src / ui / theme-toggle.js View on Github external
function Themeable(props) {
  const [themeName, setThemeName] = React.useState(Theme.defaultName)

  const handleSelect = (evt, index) => {
    const nextTheme = Theme.names[Object.keys(Theme.names)[index]]
    setThemeName(nextTheme)
  }

  return (
    <>
      <style>{`
        .themeable {
          position: relative;
        }
        .themeable-dark {
          background: ${core.colors.gray06};
        }
        .themeable-light {</style>