mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Add icons to navigation
This commit is contained in:
		
							parent
							
								
									f462da5224
								
							
						
					
					
						commit
						12617aa6e9
					
				@ -1,7 +1,7 @@
 | 
				
			|||||||
import React, { Component } from 'react';
 | 
					import React, { Component } from 'react';
 | 
				
			||||||
import { Layout, Drawer, Header, Navigation, Content,
 | 
					import { Layout, Drawer, Header, Navigation, Content,
 | 
				
			||||||
    Footer, FooterSection, FooterDropDownSection, FooterLinkList,
 | 
					    Footer, FooterSection, FooterDropDownSection, FooterLinkList,
 | 
				
			||||||
    Grid, Cell,
 | 
					    Grid, Cell, Icon,
 | 
				
			||||||
} from 'react-mdl';
 | 
					} from 'react-mdl';
 | 
				
			||||||
import { Link } from 'react-router';
 | 
					import { Link } from 'react-router';
 | 
				
			||||||
import style from './styles.scss';
 | 
					import style from './styles.scss';
 | 
				
			||||||
@ -95,11 +95,11 @@ export default class App extends Component {
 | 
				
			|||||||
    onOverlayClick = () => this.setState({ drawerActive: false });
 | 
					    onOverlayClick = () => this.setState({ drawerActive: false });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render () {
 | 
					    render () {
 | 
				
			||||||
        const createListItem = (path, caption) =>
 | 
					        const createListItem = (path, caption, icon) =>
 | 
				
			||||||
            <a
 | 
					            <a
 | 
				
			||||||
                href={this.context.router.createHref(path)}
 | 
					                href={this.context.router.createHref(path)}
 | 
				
			||||||
                className={this.context.router.isActive(path) ? style.active : ''}>
 | 
					                className={this.context.router.isActive(path) ? style.active : ''}>
 | 
				
			||||||
                {caption}
 | 
					                <Icon name={icon} /> {caption}
 | 
				
			||||||
            </a>;
 | 
					            </a>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return (
 | 
					        return (
 | 
				
			||||||
@ -114,11 +114,11 @@ export default class App extends Component {
 | 
				
			|||||||
                    </Header>
 | 
					                    </Header>
 | 
				
			||||||
                    <Drawer title="Unleash Admin">
 | 
					                    <Drawer title="Unleash Admin">
 | 
				
			||||||
                        <Navigation>
 | 
					                        <Navigation>
 | 
				
			||||||
                            {createListItem('/features', 'Feature toggles')}
 | 
					                            {createListItem('/features', 'Feature toggles', 'list')}
 | 
				
			||||||
                            {createListItem('/strategies', 'Strategies')}
 | 
					                            {createListItem('/strategies', 'Strategies', 'extension')}
 | 
				
			||||||
                            {createListItem('/history', 'Event history')}
 | 
					                            {createListItem('/history', 'Event history', 'history')}
 | 
				
			||||||
                            {createListItem('/archive', 'Archived toggles')}
 | 
					                            {createListItem('/archive', 'Archived toggles', 'archive')}
 | 
				
			||||||
                            {createListItem('/applications', 'Applications')}
 | 
					                            {createListItem('/applications', 'Applications', 'apps')}
 | 
				
			||||||
                            {/*createListItem('/metrics', 'Client metrics')*/}
 | 
					                            {/*createListItem('/metrics', 'Client metrics')*/}
 | 
				
			||||||
                            {/*createListItem('/client-strategies', 'Client strategies')*/}
 | 
					                            {/*createListItem('/client-strategies', 'Client strategies')*/}
 | 
				
			||||||
                            {/*createListItem('/client-instances', 'Client instances')*/}
 | 
					                            {/*createListItem('/client-instances', 'Client instances')*/}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user