18 lines
415 B
TypeScript
18 lines
415 B
TypeScript
import * as React from "react";
|
|
|
|
import "../style/suggestion.scss";
|
|
import { Suggestion } from "../types/suggestion";
|
|
|
|
interface Props {
|
|
suggestion: Suggestion;
|
|
onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
}
|
|
|
|
const Sugestion = (props: Props) => {
|
|
return <div className="suggestion-component" onClick={props.onClick}>
|
|
{props.suggestion.display}
|
|
</div>;
|
|
};
|
|
|
|
export default Sugestion;
|