Created
November 9, 2020 13:52
-
-
Save indreklasn/0e030f60e8ad216ade39c0068509ec7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Skeleton from "react-loading-skeleton"; | |
export default function BlogPost({ title, body, subTitle }) { | |
return ( | |
<div> | |
<h1>{title || <Skeleton />}</h1> | |
<h3>{subTitle || <Skeleton />}</h3> | |
<p>{body || <Skeleton count={6} />}</p> | |
<button> | |
{body ? "Read more" : <Skeleton height={25} width={100} />} | |
</button> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment