In my application there is two component called Employee and EmplyeeButtonGroup.
export default class Employee extends Component {
render() {
return (
<h1>Permanent</h1>
<EmplyeeButtonGroup />
<EmplyeeButtonGroup />
<h1>Temporary</h1>
<EmplyeeButtonGroup />
<EmplyeeButtonGroup />
)}
}
export default class EmplyeeButtonGroup extends Component {
render() {
return (
<Button>Add</Button>
<Button>Delete</Button>
<Button>Send</Button>
)}
}
Under the <h1>Temporary</h1> this heading, I want to disable Delete and Add buttons.I can do this by creating two component for temporary and permanent employees. But I am looking for another way. How can I do this using react?
Thanks in advance.