Skip to content

[WIP] Add terraform catalog entry point selection #9223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _history
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
simulate_queue_worker
simulate_queue_worker
simulate_queue_worker
simulate_queue_worker
simulate_queue_worker
exit
31 changes: 31 additions & 0 deletions app/javascript/components/automate-entry-points/checkbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';

const Checkbox = ({ defaultState = false, onChange, children }) => {
const [on, setOn] = useState(defaultState);
const handleChange = (e) => {
setOn(e.target.checked);
onChange && onChange(e.target.checked);
};
return (
<form style={{ display: 'inline-block', padding: 10 }}>
<label>
<input type="checkbox" checked={on} onChange={handleChange} />
{children}
</label>
</form>
);
};

Checkbox.propTypes = {
defaultState: PropTypes.bool,
onChange: PropTypes.func.isRequired,
children: PropTypes.arrayOf(PropTypes.any),
};

Checkbox.defaultProps = {
defaultState: false,
children: [],
};

export default Checkbox;
Loading
Loading