1// general component
2<ButtonComponent text="General" />
3
4 // button component
5const ButtonComponent = (props) => {
6 const handleClick = () => {
7 console.log(props.text);
8 };
9
10 return (
11 <button onClick={ handleClick }>{ props.text }</button>
12 );
13};