22 lines
410 B
TypeScript
22 lines
410 B
TypeScript
import React, { Component } from "react";
|
|
|
|
export interface QuestionProps {
|
|
children: any;
|
|
onRemove: () => any;
|
|
}
|
|
|
|
class Question extends Component<QuestionProps> {
|
|
render() {
|
|
const { children, onRemove } = this.props;
|
|
|
|
return (
|
|
<div>
|
|
<button type="button" className="remove" onClick={onRemove}>Delete</button>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Question;
|