Created
February 20, 2019 23:26
-
-
Save MykolaGolubyev/cbc40861c31716fe37521d501eb78eaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class MyAppComponentViewer extends React.Component { | |
render() { | |
return ( | |
<ComponentViewer | |
registries={registries} | |
dropDown={{ | |
label: 'Brand', | |
items: [ | |
{label: 'Brand One', hotKey: 'Alt 1'}, | |
{label: 'Brand Two', hotKey: 'Alt 2'} | |
], | |
onSelect: this.onBrandSelect | |
}} | |
/> | |
); | |
} | |
private onBrandSelect = (brand: string) => { | |
const brandDir = brand.toLocaleLowerCase(); | |
updateCssRef('stylesheet', brandDir, 'style'); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment