mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-14 01:16:17 +02:00
add site url link
This commit is contained in:
parent
f665228a5a
commit
4b9a60a735
@ -3,7 +3,7 @@ import React, { Component, PureComponent } from 'react';
|
|||||||
|
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router';
|
||||||
import { Grid, Cell, List, ListItem, ListItemContent, Textfield, Icon, ProgressBar } from 'react-mdl';
|
import { Grid, Cell, List, ListItem, ListItemContent, Textfield, Icon, ProgressBar } from 'react-mdl';
|
||||||
import { HeaderTitle } from '../common';
|
import { HeaderTitle, ExternalIconLink } from '../common';
|
||||||
|
|
||||||
class StatefulTextfield extends Component {
|
class StatefulTextfield extends Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
@ -51,7 +51,9 @@ class ClientStrategies extends PureComponent {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<HeaderTitle title={<span><Icon name={icon} /> {appName}</span>} subtitle={description} />
|
<HeaderTitle title={<span><Icon name={icon} /> {appName}</span>} subtitle={description}
|
||||||
|
actions={url && <ExternalIconLink url={url}>Visit site</ExternalIconLink>}
|
||||||
|
/>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Cell col={3}>
|
<Cell col={3}>
|
||||||
<h6> Toggles</h6>
|
<h6> Toggles</h6>
|
||||||
|
@ -79,3 +79,17 @@ export function getIcon (type) {
|
|||||||
default: return 'star';
|
default: return 'star';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const IconLink = ({ icon, children, ...props }) => (
|
||||||
|
<a {...props} style={{ textDecoration: 'none' }}>
|
||||||
|
<Icon name={icon} style={{ marginRight: '5px', verticalAlign: 'middle' }}/>
|
||||||
|
<span style={{ textDecoration: 'none', verticalAlign: 'middle' }}>{children}</span>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const ExternalIconLink = ({ url, children }) => (
|
||||||
|
<IconLink icon="queue" href={url} target="_blank" rel="noopener">
|
||||||
|
{children}
|
||||||
|
</IconLink>
|
||||||
|
);
|
||||||
|
@ -69,6 +69,7 @@ class EditFeatureToggleWrapper extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h4>{featureToggle.name} <small>{featureToggle.enabled ? 'is enabled' : 'is disabled'}</small></h4>
|
<h4>{featureToggle.name} <small>{featureToggle.enabled ? 'is enabled' : 'is disabled'}</small></h4>
|
||||||
|
<p>{featureToggle.description}</p>
|
||||||
<hr />
|
<hr />
|
||||||
<SwitchWithLabel
|
<SwitchWithLabel
|
||||||
checked={featureToggle.enabled}
|
checked={featureToggle.enabled}
|
||||||
@ -120,7 +121,6 @@ class EditFeatureToggleWrapper extends React.Component {
|
|||||||
</Link>
|
</Link>
|
||||||
</Cell>
|
</Cell>
|
||||||
</Grid>
|
</Grid>
|
||||||
<p>{featureToggle.description}</p>
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user