1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix getIcon

This commit is contained in:
sveisvei 2016-12-10 14:02:41 +01:00
parent 659b668814
commit f462da5224
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,6 @@
const React = require('react');
const {
List, ListItem, ListItemContent,
Grid, Cell,
Button, Icon,
Switch,
} = require('react-mdl');
@ -70,3 +69,13 @@ export const TogglesLinkList = ({ toggles }) => (
))}
</List>
);
export function getIcon (type) {
switch (type) {
case 'feature-updated': return 'autorenew';
case 'feature-created': return 'add';
case 'feature-deleted': return 'remove';
case 'feature-archived': return 'archived';
default: return 'star';
}
};

View File

@ -10,9 +10,8 @@ import EditFeatureToggle from './form-edit-container.jsx';
import { fetchFeatureToggles, toggleFeature } from '../../store/feature-actions';
import { fetchFeatureMetrics, fetchSeenApps } from '../../store/feature-metrics-actions';
import { fetchHistoryForToggle } from '../../store/history-actions';
import { getIcon } from '../history/history-item-diff';
import { AppsLinkList, SwitchWithLabel } from '../common';
import { AppsLinkList, SwitchWithLabel, getIcon } from '../common';
class EditFeatureToggleWrapper extends React.Component {