Skip to content
Snippets Groups Projects
Commit 0d463e0f authored by Chif Gergő's avatar Chif Gergő
Browse files

Add news component

parent 10077ee7
No related branches found
No related tags found
2 merge requests!7update master to dev,!6Demo
...@@ -11,4 +11,9 @@ module.exports = { ...@@ -11,4 +11,9 @@ module.exports = {
env: { env: {
browser: true, browser: true,
}, },
rules: {
'react/prop-types': 0,
'@typescript-eslint/explicit-function-return-type': 2,
},
}; };
import { Grid, Typography } from '@material-ui/core';
import React from 'react';
interface NewsProps {
title: string;
content: string;
author: string;
}
const News: React.FC<NewsProps> = ({ title, content, author }) => (
<Grid container direction="column">
<Grid item>
<Typography variant="h6">{title}</Typography>
</Grid>
<Grid item>
<p>{content}</p>
</Grid>
<Grid item container justify="flex-end">
<Typography>{author}</Typography>
</Grid>
</Grid>
);
export default News;
import React from 'react'; import React from 'react';
const Footer = () => <div>Footer</div>; const Footer: React.FC = () => <div>Footer</div>;
export default Footer; export default Footer;
import React from 'react'; import React from 'react';
const Header = () => <div>Header</div>; const Header: React.FC = () => <div>Header</div>;
export default Header; export default Header;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment