Theme

The Theme component can change the theme (dark/light) for a page or subset of themeable components.

  • Install
    npm install @pluralsight/ps-design-system-theme
  • Import
    import Theme from '@pluralsight/ps-design-system-theme'

Examples

import Theme from '@pluralsight/ps-design-system-theme'
import React from 'react'
import { ThemedComponent } from './some/component/path'
const Example: React.FC = props => {
return (
<Theme name={Theme.names.light}>
<div>
<ThemedComponent />
</div>
</Theme>
)
}
export default Example

Props

Name
Type
Description
Default
name
dark | light
controls which theme is used in child componentsdark