diff --git a/frontend/src/component/common/index.js b/frontend/src/component/common/index.js
index 924108b1ee..621966430c 100644
--- a/frontend/src/component/common/index.js
+++ b/frontend/src/component/common/index.js
@@ -3,6 +3,7 @@ const {
List, ListItem, ListItemContent,
Grid, Cell,
Button, Icon,
+ Switch,
} = require('react-mdl');
const { Link } = require('react-router');
@@ -21,13 +22,16 @@ export const AppsLinkList = ({ apps }) => (
);
export const HeaderTitle = ({ title, actions, subtitle }) => (
-
-
- {title}
- {subtitle && {subtitle}}
- |
- {actions} |
-
+
+
+
{title}
+ {subtitle && {subtitle}}
+
+
+
+ {actions}
+
+
);
export const FormButtons = ({ submitText = 'Create', onCancel }) => (
@@ -43,3 +47,13 @@ export const FormButtons = ({ submitText = 'Create', onCancel }) => (
);
+
+export const SwitchWithLabel = ({ onChange, children, checked }) => (
+
+
+
+
+ {children}
+
+);
+
diff --git a/frontend/src/component/feature/feature-list-item-component.jsx b/frontend/src/component/feature/feature-list-item-component.jsx
index a8f1dcacab..dd8f9f69f6 100644
--- a/frontend/src/component/feature/feature-list-item-component.jsx
+++ b/frontend/src/component/feature/feature-list-item-component.jsx
@@ -37,11 +37,11 @@ const Feature = ({
-
+
onFeatureClick(feature)} checked={enabled} />
- {name} {(description && description.substring(0, 100)) || ''}
+ {name} {(description && description.substring(0, 30)) || ''}
diff --git a/frontend/src/component/feature/view-edit-container.jsx b/frontend/src/component/feature/view-edit-container.jsx
index dda46d6667..89f0a74901 100644
--- a/frontend/src/component/feature/view-edit-container.jsx
+++ b/frontend/src/component/feature/view-edit-container.jsx
@@ -12,7 +12,7 @@ import { fetchFeatureMetrics, fetchSeenApps } from '../../store/feature-metrics-
import { fetchHistoryForToggle } from '../../store/history-actions';
import { getIcon } from '../history/history-item-diff';
-import { AppsLinkList } from '../common';
+import { AppsLinkList, SwitchWithLabel } from '../common';
class EditFeatureToggleWrapper extends React.Component {
@@ -71,11 +71,9 @@ class EditFeatureToggleWrapper extends React.Component {
{featureToggle.name} {featureToggle.enabled ? 'is enabled' : 'is disabled'}
-
- toggleFeature(featureToggle)} checked={featureToggle.enabled}>
- Toggle {featureToggle.name}
-
-
+
toggleFeature(featureToggle)}>Toggle {featureToggle.name}
diff --git a/frontend/src/component/history/history-list-component.jsx b/frontend/src/component/history/history-list-component.jsx
index 9a0e5ac716..565aed7181 100644
--- a/frontend/src/component/history/history-list-component.jsx
+++ b/frontend/src/component/history/history-list-component.jsx
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import HistoryItemDiff from './history-item-diff';
import HistoryItemJson from './history-item-json';
import { Switch, Table, TableHeader, Grid, Cell } from 'react-mdl';
-import { HeaderTitle } from '../common';
+import { HeaderTitle, SwitchWithLabel } from '../common';
import style from './history.scss';
@@ -42,7 +42,9 @@ class HistoryList extends Component {
return (
- Show full events}/>
+ Show full events
+ }/>
{entries}
);
|