24 lines
564 B
JavaScript
24 lines
564 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import GenericPageWithIcon from "./GenericPageWithIcon";
|
|
import { Sun } from "grommet-icons";
|
|
|
|
function Temperature(props) {
|
|
return (
|
|
<GenericPageWithIcon
|
|
title={props.data.temperature}
|
|
description={`The current temperature outside is ${props.data.temperature}℃`}
|
|
icon={<Sun color="plain" size="xlarge" />}
|
|
close={props.close}
|
|
/>);
|
|
}
|
|
|
|
Temperature.propTypes = {
|
|
data: PropTypes.object,
|
|
close: PropTypes.func
|
|
};
|
|
|
|
Temperature.pluginName = "Temperature";
|
|
|
|
export default Temperature;
|