github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/dashboard/assets/common.jsx (about)

     1  // @flow
     2  
     3  
     4  type ProvidedMenuProp = {|title: string, icon: string|};
     5  const menuSkeletons: Array<{|id: string, menu: ProvidedMenuProp|}> = [
     6  	{
     7  		id:   'home',
     8  		menu: {
     9  			title: 'Home',
    10  			icon:  'home',
    11  		},
    12  	}, {
    13  		id:   'chain',
    14  		menu: {
    15  			title: 'Chain',
    16  			icon:  'link',
    17  		},
    18  	}, {
    19  		id:   'txpool',
    20  		menu: {
    21  			title: 'TxPool',
    22  			icon:  'credit-card',
    23  		},
    24  	}, {
    25  		id:   'network',
    26  		menu: {
    27  			title: 'Network',
    28  			icon:  'globe',
    29  		},
    30  	}, {
    31  		id:   'system',
    32  		menu: {
    33  			title: 'System',
    34  			icon:  'tachometer',
    35  		},
    36  	}, {
    37  		id:   'logs',
    38  		menu: {
    39  			title: 'Logs',
    40  			icon:  'list',
    41  		},
    42  	},
    43  ];
    44  export type MenuProp = {|...ProvidedMenuProp, id: string|};
    45  // The sidebar menu and the main content are rendered based on these elements.
    46  // Using the id is circumstantial in some cases, so it is better to insert it also as a value.
    47  // This way the mistyping is prevented.
    48  export const MENU: Map<string, {...MenuProp}> = new Map(menuSkeletons.map(({id, menu}) => ([id, {id, ...menu}])));
    49  
    50  export const DURATION = 200;
    51  
    52  export const styles = {
    53  	light: {
    54  		color: 'rgba(255, 255, 255, 0.54)',
    55  	},
    56  }