@@ -63,7 +63,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
6363 ThemeGenerator . insureSlots ( themeRules , isDark ( themeRules [ BaseSlots [ BaseSlots . backgroundColor ] ] . color ! ) ) ;
6464
6565 this . state = {
66- themeRules : themeRules ,
66+ themeRules,
6767 colorPickerSlotRule : null ,
6868 colorPickerElement : null ,
6969 colorPickerVisible : false ,
@@ -86,7 +86,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
8686 this . _async . dispose ( ) ;
8787 }
8888
89- public render ( ) : JSX . Element {
89+ public render ( ) : React . ReactElement {
9090 const { colorPickerVisible, colorPickerSlotRule, colorPickerElement } = this . state ;
9191
9292 const fabricThemeSlots = [
@@ -270,7 +270,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
270270 true ,
271271 true ,
272272 ) ;
273- this . setState ( { themeRules : themeRules } , this . _makeNewTheme ) ;
273+ this . setState ( { themeRules } , this . _makeNewTheme ) ;
274274 } , 20 ) ;
275275 // 20ms is low enough that you can slowly drag to change color and see that theme,
276276 // but high enough that quick changes don't get bogged down by a million changes inbetween
@@ -298,7 +298,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
298298 }
299299 } ;
300300
301- private _slotWidget = ( slotRule : IThemeSlotRule ) : JSX . Element => {
301+ private _slotWidget = ( slotRule : IThemeSlotRule ) : React . ReactElement => {
302302 return (
303303 < div key = { slotRule . name } className = "ms-themer-slot" >
304304 { this . _colorSquareSwatchWidget ( slotRule ) }
@@ -310,11 +310,11 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
310310 ) ;
311311 } ;
312312
313- private _fabricSlotWidget = ( fabricSlot : FabricSlots ) : JSX . Element => {
313+ private _fabricSlotWidget = ( fabricSlot : FabricSlots ) : React . ReactElement => {
314314 return this . _slotWidget ( this . state . themeRules [ FabricSlots [ fabricSlot ] ] ) ;
315315 } ;
316316
317- private _colorSquareSwatchWidget ( slotRule : IThemeSlotRule ) : JSX . Element {
317+ private _colorSquareSwatchWidget ( slotRule : IThemeSlotRule ) : React . ReactElement {
318318 return (
319319 < div
320320 key = { slotRule . name }
@@ -325,7 +325,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
325325 ) ;
326326 }
327327
328- private _accessibilityRow = ( foreground : FabricSlots , background : FabricSlots ) : JSX . Element => {
328+ private _accessibilityRow = ( foreground : FabricSlots , background : FabricSlots ) : React . ReactElement => {
329329 const themeRules = this . state . themeRules ;
330330 const bgc : IColor = themeRules [ FabricSlots [ background ] ] . color ! ;
331331 const fgc : IColor = themeRules [ FabricSlots [ foreground ] ] . color ! ;
@@ -346,8 +346,8 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
346346 ) ;
347347 } ;
348348
349- private _accessibilityTableBody = ( ) : JSX . Element => {
350- const accessibilityRows : JSX . Element [ ] = [
349+ private _accessibilityTableBody = ( ) : React . ReactElement => {
350+ const accessibilityRows : React . ReactElement [ ] = [
351351 this . _accessibilityRow ( FabricSlots . neutralPrimary , FabricSlots . white ) , // default
352352 // primary color also needs to be accessible, this is also strong variant default
353353 this . _accessibilityRow ( FabricSlots . white , FabricSlots . themePrimary ) ,
@@ -375,7 +375,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
375375 return < tbody > { accessibilityRows } </ tbody > ;
376376 } ;
377377
378- private _outputSection = ( ) : JSX . Element => {
378+ private _outputSection = ( ) : React . ReactElement => {
379379 const themeRules = this . state . themeRules ;
380380
381381 // strip out the unnecessary shade slots from the final output theme
@@ -453,7 +453,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
453453 console . log ( 'New theme:' , finalTheme ) ;
454454 } ;
455455
456- private _baseColorSlotPicker = ( baseSlot : BaseSlots , title : string ) : JSX . Element => {
456+ private _baseColorSlotPicker = ( baseSlot : BaseSlots , title : string ) : React . ReactElement => {
457457 let colorChangeTimeout : number ;
458458
459459 const onChange = ( ev : React . MouseEvent < HTMLElement > , newColor : IColor ) : void => {
@@ -468,7 +468,7 @@ export class ColorsPage extends React.Component<{}, IColorsPageState> {
468468 // isInverted got swapped, so need to refresh slots with new shading rules
469469 ThemeGenerator . insureSlots ( themeRules , ! currentIsDark ) ;
470470 }
471- this . setState ( { themeRules : themeRules } , this . _makeNewTheme ) ;
471+ this . setState ( { themeRules } , this . _makeNewTheme ) ;
472472 } , 20 ) ;
473473 // 20ms is low enough that you can slowly drag to change color and see that theme,
474474 // but high enough that quick changes don't get bogged down by a million changes inbetween
0 commit comments