mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-11 00:24:12 +02:00
Add typescript types for patterns
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Badge">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Breadcrumb">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -5,7 +5,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Button with icon">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex flex-column h-100 pa2">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Card">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,7 +5,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Centering">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,7 +5,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Docked at corner">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -3,10 +3,14 @@ import React, { useState } from 'react';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
interface DotProps {
|
||||
index: number;
|
||||
}
|
||||
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [activeItem, setActiveItem] = useState(0);
|
||||
|
||||
const Dot = ({ index }) => {
|
||||
const Dot: React.FC<DotProps> = ({ index }) => {
|
||||
const isActive = index === activeItem;
|
||||
const click = () => setActiveItem(index);
|
||||
return (
|
||||
|
@@ -5,7 +5,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex flex-column justify-center h-100 pa2 w-100">
|
||||
|
@@ -6,7 +6,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Feature list">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Triangle from '../../placeholders/Triangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="relative">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Triangle from '../../placeholders/Triangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Fixed at corner">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Holy grail">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex items-center justify-center pa2">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Input add-on">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Square from '../../placeholders/Square';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex h-100 items-start pa2 w-100">
|
||||
|
@@ -6,7 +6,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import Square from '../../placeholders/Square';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Media object">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa3">
|
||||
|
@@ -5,7 +5,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Menu">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex flex-column h-100 items-center justify-center pa3">
|
||||
|
@@ -6,7 +6,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Modal">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Notification">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -5,7 +5,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Pagination">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Previous and next buttons">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -5,7 +5,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex items-center justify-center ph2">
|
||||
|
@@ -6,7 +6,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Pricing table">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import useInterval from '../../hooks/useInterval';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [progress, setProgress] = useState(0);
|
||||
useInterval(() => {
|
||||
setProgress(v => v === 100 ? 0 : v + 1);
|
||||
|
@@ -5,7 +5,7 @@ import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import Triangle from '../../placeholders/Triangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -6,10 +6,15 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
import Triangle from '../../placeholders/Triangle';
|
||||
|
||||
const Details = () => {
|
||||
interface ItemProps {
|
||||
index: number;
|
||||
title: React.ReactNode;
|
||||
}
|
||||
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [activeItem, setActiveItem] = useState(-1);
|
||||
|
||||
const Item = ({ index, title, children }) => {
|
||||
const Item: React.FC<ItemProps> = ({ index, title, children }) => {
|
||||
const isOpened = (index === activeItem);
|
||||
const click = () => setActiveItem(isOpened ? -1 : index);
|
||||
return (
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -5,7 +5,7 @@ import RelatedPatterns from '../../components/RelatedPatterns';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [isFirstChecked, setFirstChecked] = useState(false);
|
||||
const toggle = () => setFirstChecked(c => !c);
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Square from '../../placeholders/Square';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="flex h-100 pa2">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Same height columns">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Search box">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Separator">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Block from '../../placeholders/Block';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Sidebar">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Simple grid">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -5,7 +5,7 @@ import Circle from '../../placeholders/Circle';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Slider">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,7 +4,7 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Split navigation">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -4,7 +4,7 @@ import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex">
|
||||
|
@@ -6,7 +6,7 @@ import Block from '../../placeholders/Block';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Split screen">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex items-center justify-center pa2">
|
||||
|
@@ -4,11 +4,11 @@ import { Link } from 'react-router-dom';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [value, setValue] = useState(0);
|
||||
const decrease = () => setValue(value - 1);
|
||||
const increase = () => setValue(value + 1);
|
||||
const change = (e) => setValue(parseInt(e.target.value, 10));
|
||||
const change = (e: React.ChangeEvent<HTMLInputElement>) => setValue(parseInt(e.target.value, 10));
|
||||
|
||||
return (
|
||||
<DetailsLayout title="Stepper input">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Sticky footer">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column">
|
||||
|
@@ -5,7 +5,7 @@ import Block from '../../placeholders/Block';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Sticky header">
|
||||
<div className="ph4 pv5">
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -4,7 +4,7 @@ import RelatedPatterns from '../../components/RelatedPatterns';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [checked, setChecked] = useState(false);
|
||||
const toggle = () => setChecked(c => !c);
|
||||
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -4,10 +4,14 @@ import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Rectangle from '../../placeholders/Rectangle';
|
||||
|
||||
const Details = () => {
|
||||
interface TabProps {
|
||||
tabIndex: number;
|
||||
}
|
||||
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [activeTab, setActiveTab] = useState(0);
|
||||
|
||||
const Tab = ({ tabIndex, children }) => {
|
||||
const Tab: React.FC<TabProps> = ({ tabIndex, children }) => {
|
||||
const isActive = tabIndex === activeTab;
|
||||
const click = () => setActiveTab(tabIndex);
|
||||
return (
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center pa2">
|
||||
|
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
||||
import DetailsLayout from '../../layouts/DetailsLayout';
|
||||
import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const toggle = () => setVisible(v => !v);
|
||||
|
||||
|
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import Frame from '../../placeholders/Frame';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Cover = () => {
|
||||
const Cover: React.FC<{}> = () => {
|
||||
return (
|
||||
<Frame>
|
||||
<div className="h-100 flex flex-column items-center justify-center">
|
||||
|
@@ -6,7 +6,7 @@ import BrowserFrame from '../../placeholders/BrowserFrame';
|
||||
import Circle from '../../placeholders/Circle';
|
||||
import Line from '../../placeholders/Line';
|
||||
|
||||
const Details = () => {
|
||||
const Details: React.FC<{}> = () => {
|
||||
return (
|
||||
<DetailsLayout title="Wizard">
|
||||
<div className="ph4 pv5">
|
||||
|
Reference in New Issue
Block a user