Sha256: 029097dbbd2a7b354408fe8baa7cb8a1bfa4e6a271ce0d1de9b385fd3312302f

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';

const RailsData = ({ view, parameter, value }) => {
  const id = `foreman_acd_${view}_${parameter}`;
  const name = `foreman_acd_${view}[${parameter}]`;

  return <input id={id} name={name} value={value} type="hidden" />;
};

RailsData.propTypes = {
  view: PropTypes.string.isRequired,
  parameter: PropTypes.string.isRequired,
  value: PropTypes.string.isRequired,
};

export default RailsData;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_acd-0.11.0 webpack/components/common/RailsData.js
foreman_acd-0.10.0 webpack/components/common/RailsData.js