mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
- use "json-server" for serving mocked API responses. - setup redux to fetch responses when featureToggle list is mounted.
19 lines
434 B
JavaScript
19 lines
434 B
JavaScript
/* eslint no-shadow: ["error", { "allow": ["name"] }]*/
|
|
|
|
import React, { PropTypes } from 'react';
|
|
|
|
const Feature = ({ onClick, name, enabled }) => (
|
|
<li>
|
|
{name} is {enabled ? 'enabled ' : 'disabled '}
|
|
<a onClick={onClick} href="#">toggle</a>
|
|
</li>
|
|
);
|
|
|
|
Feature.propTypes = {
|
|
onClick: PropTypes.func.isRequired,
|
|
enabled: PropTypes.bool.isRequired,
|
|
name: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default Feature;
|