From a1e04eb03f73e3869777842f683e907ee705b66b Mon Sep 17 00:00:00 2001 From: Sjaak Luthart Date: Tue, 13 Jun 2017 11:35:52 +0200 Subject: [PATCH 1/5] :construction: WIP fixing icons --- docs/src/components/icons.jsx | 12 +++++++++--- src/icons/index.js | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/src/components/icons.jsx b/docs/src/components/icons.jsx index 7385f500..c0a6c2fa 100644 --- a/docs/src/components/icons.jsx +++ b/docs/src/components/icons.jsx @@ -1,7 +1,6 @@ import React from 'react'; import ReactMarkdown from 'react-markdown'; import _ from 'underscore'; -import uuid from 'uuid'; import * as icons from '../../../dist/icons'; import components from '../../components.json'; import Paper from '../../../dist/paper'; @@ -19,7 +18,12 @@ const IconsDoc = () => { margin: 0, padding: '20px' }, - icon: { margin: '10px' } + icon: { + margin: '10px', + display: 'flex', + flexDirection: 'column', + alignItems: 'center' + } }; return ( @@ -36,7 +40,9 @@ const IconsDoc = () => {

Examples

- {_.map(icons, icon => React.createElement(icon, { style: style.icon, key: uuid.v4() }))} + {_.map(icons, (icon, name) => ( +
{React.createElement(icon)} {name}
+ ))}

Available icons

Props

- - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault valueRequired
colorstringThe icon's color#C4C4C4No
+ + + + Name + Type + Description + Default value + Required + + + + + color + string + The icon's color + #C4C4C4 + No + + +
); From 4d6f6a0de3b3c4fa1a807bd413cdb1182623d2e9 Mon Sep 17 00:00:00 2001 From: Sjaak Luthart Date: Tue, 13 Jun 2017 17:00:45 +0200 Subject: [PATCH 5/5] :art: Changed imports --- docs/src/components/nav.jsx | 103 ++++-------------------------------- 1 file changed, 9 insertions(+), 94 deletions(-) diff --git a/docs/src/components/nav.jsx b/docs/src/components/nav.jsx index 6fd39780..824201fa 100644 --- a/docs/src/components/nav.jsx +++ b/docs/src/components/nav.jsx @@ -4,105 +4,20 @@ import _ from 'underscore'; import Menu from '../../../dist/menu'; import MenuItem from '../../../dist/menu-item'; import npmPackage from '../../../package.json'; -import IconAddImage from '../../../dist/icons/icon-add-image'; -import IconChannels from '../../../dist/icons/icon-channels'; -import IconChannel from '../../../dist/icons/icon-channel'; -import IconClock from '../../../dist/icons/icon-clock'; -import IconConversation from '../../../dist/icons/icon-conversation'; -import IconEdit from '../../../dist/icons/icon-edit'; -import IconError from '../../../dist/icons/icon-error'; -import IconExit from '../../../dist/icons/icon-exit'; -import IconFont from '../../../dist/icons/icon-font'; -import IconEmoji from '../../../dist/icons/icon-emoji'; -import IconHammer from '../../../dist/icons/icon-hammer'; -import IconHand from '../../../dist/icons/icon-hand'; -import IconInfo from '../../../dist/icons/icon-info'; -import IconsLanguage from '../../../dist/icons/icon-language'; -import IconLock from '../../../dist/icons/icon-lock'; -import IconMute from '../../../dist/icons/icon-mute'; -import IconPeople from '../../../dist/icons/icon-people'; -import IconPerson from '../../../dist/icons/icon-person'; -import IconPower from '../../../dist/icons/icon-power'; -import IconRocket from '../../../dist/icons/icon-rocket'; -import IconSend from '../../../dist/icons/icon-send'; -import IconSettings from '../../../dist/icons/icon-settings'; -import IconSuccess from '../../../dist/icons/icon-success'; -import IconWarning from '../../../dist/icons/icon-warning'; -import IconSearch from '../../../dist/icons/icon-search'; -import IconMicrophone from '../../../dist/icons/icon-microphone'; -import IconActivity from '../../../dist/icons/icon-activity'; -import IconFood from '../../../dist/icons/icon-food'; -import IconNature from '../../../dist/icons/icon-nature'; -import IconObjects from '../../../dist/icons/icon-objects'; -import IconSymbols from '../../../dist/icons/icon-symbols'; -import IconTravel from '../../../dist/icons/icon-travel'; -import IconAddFriend from '../../../dist/icons/icon-add-friend'; -import IconBlock from '../../../dist/icons/icon-block'; -import IconPicture from '../../../dist/icons/icon-picture'; -import IconReport from '../../../dist/icons/icon-report'; -import IconRemoveFriend from '../../../dist/icons/icon-remove-friend'; -import IconThumbsUp from '../../../dist/icons/icon-thumbs-up'; -import IconThumbsDown from '../../../dist/icons/icon-thumbs-down'; -import IconRules from '../../../dist/icons/icon-rules'; -import IconQuestion from '../../../dist/icons/icon-question'; -import IconDelete from '../../../dist/icons/icon-delete'; -import IconAdmin from '../../../dist/icons/icon-admin'; -import IconNotification from '../../../dist/icons/icon-notification'; -import IconRefresh from '../../../dist/icons/icon-refresh'; - -const icons = [ - IconAddImage, - IconChannels, - IconChannel, - IconClock, - IconConversation, - IconEdit, - IconError, - IconExit, - IconFont, - IconEmoji, - IconHammer, - IconHand, - IconInfo, - IconsLanguage, - IconLock, - IconMute, - IconPeople, - IconPerson, - IconPower, - IconRocket, - IconSend, - IconSettings, - IconSuccess, - IconWarning, - IconSearch, - IconMicrophone, - IconActivity, - IconFood, - IconNature, - IconObjects, - IconSymbols, - IconTravel, - IconAddFriend, - IconBlock, - IconPicture, - IconReport, - IconRemoveFriend, - IconThumbsUp, - IconThumbsDown, - IconRules, - IconQuestion, - IconDelete, - IconAdmin, - IconNotification, - IconRefresh -]; +import * as icons from '../../../dist/icons'; const Nav = (props, context) => { const { router } = context; + const style = { + icon: { + width: '24px', + height: '24px' + } + }; + return ( - + router.push('/')} active={router.location.pathname === '/'} text="Getting started" /> router.push('/admin-badge')} active={router.isActive('/admin-badge')} text="AdminBadge" /> router.push('/alert')} active={router.isActive('/alert')} text="Alert" />