update src/components/Blogss/design1/index.js

master
mahdi andalib 3 years ago
parent e00c3e5010
commit 313d66d50b
  1. 10
      src/components/Blogss/design1/index.js
  2. 18
      src/components/RelativeCircle/index.js

@ -1,3 +1,5 @@
import RelativeCircle from "../../RelativeCircle";
const BlogDesign1 = ({ const BlogDesign1 = ({
blogTitle, blogTitle,
blogExcerpt, blogExcerpt,
@ -39,9 +41,11 @@ const BlogDesign1 = ({
</p> </p>
<div class="relative"> <div class="relative">
<img class="w-7 rounded-full" src={commentIcon} alt="" /> <img class="w-7 rounded-full" src={commentIcon} alt="" />
<span class="w-6 h-6 text-center flex flex-col items-center justify-center font-sansbold absolute top-0 right-0 transform translate-x-2 -translate-y-2 text-[10px] bg-[#818181] text-white border-2 border-white dark:border-gray-800 rounded-full"> <RelativeCircle
{commentNum} className={
</span> "font-sansbold absolute top-0 right-0 transform translate-x-2 -translate-y-2 text-[10px] bg-[#818181] text-white "
}
/>
</div> </div>
</div> </div>
)} )}

@ -0,0 +1,18 @@
import React from "react";
const RelativeCircle = ({ commentNum, className }) => {
return (
<span
class={`w-6 h-6 flex flex-col items-center justify-center text-center rounded-full border-2 ${className}`}
>
{commentNum}
</span>
);
};
export default RelativeCircle;
RelativeCircle.defaultProps = {
commentNum: "26",
className: "",
};
Loading…
Cancel
Save