Codeminer42/cm42-central

View on GitHub
app/assets/javascripts/components/story/StoryStateButtons.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';

const renderInputButton = event => (
  <input
    type="button"
    key={event}
    className={`transition ${event}`}
    value={I18n.t(`story.events.${event}`)}
  />
);

const StateButtons = ({ events }) => (
  <div className="state-actions">{events.map(renderInputButton)}</div>
);

export default StateButtons;