1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-20 21:01:31 +02:00

Add typescript types for patterns

This commit is contained in:
Phuoc Nguyen
2019-11-24 23:36:43 +07:00
parent 154a61de91
commit 6d3d9da384
88 changed files with 146 additions and 93 deletions

View File

@@ -4,7 +4,11 @@ import { Link } from 'react-router-dom';
import useDocumentTitle from '../hooks/useDocumentTitle';
import Layout from './Layout';
const DetailsLayout = ({ title, children }) => {
interface DetailsLayoutProps {
title: string;
}
const DetailsLayout: React.FC<DetailsLayoutProps> = ({ title, children }) => {
useDocumentTitle(`CSS Layout ∙ ${title}`);
return (

View File

@@ -2,7 +2,7 @@ import React from 'react';
import Heading from '../components/Heading';
const Footer = () => {
const Footer: React.FC<{}> = () => {
return (
<div className="bl br bb b--black-20 flex justify-between br4 br--bottom">
<div className="br b--black-20" style={{ flex: 1 }}>

View File

@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
import Footer from './Footer';
const Layout = ({ children }) => {
const Layout: React.FC<{}> = ({ children }) => {
useEffect(() => {
window.scrollTo(0, 0);
}, []);