Skip to content

Instantly share code, notes, and snippets.

@TechWithTy
Created June 16, 2023 02:10
Show Gist options
  • Save TechWithTy/bffd611e54a02afd8c8fa0b489ef5cf1 to your computer and use it in GitHub Desktop.
Save TechWithTy/bffd611e54a02afd8c8fa0b489ef5cf1 to your computer and use it in GitHub Desktop.
Customer Portal Example Tailwind.css
import React from 'react';
interface Props {
title: string;
description: string;
}
const ReusableComponent: React.FC<Props> = ({ title, description }) => {
return (
<div className="relative min-h-screen flex">
<div className="flex flex-col sm:flex-row items-center md:items-start sm:justify-center md:justify-start flex-auto min-w-0 bg-white">
<div
className="sm:w-1/2 xl:w-3/5 h-full hidden md:flex flex-auto items-center justify-center p-10 overflow-hidden bg-purple-900 text-white bg-no-repeat bg-cover relative"
style={{
backgroundImage:
'url(https://images.unsplash.com/photo-1579451861283-a2239070aaa9?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80)',
}}
>
<div className="absolute bg-gradient-to-b from-indigo-600 to-blue-500 opacity-75 inset-0 z-0"></div>
<div className="w-full max-w-md z-10">
<div className="sm:text-4xl xl:text-5xl font-bold leading-tight mb-6">
{title}
</div>
<div className="sm:text-sm xl:text-md text-gray-200 font-normal">
{description}
</div>
</div>
<ul className="circles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div className="md:flex md:items-center md:justify-center w-full sm:w-auto md:h-full w-2/5 xl:w-2/5 p-8 md:p-10 lg:p-14 sm:rounded-lg md:rounded-none bg-white">
<div className="max-w-md w-full space-y-8">
<div className="text-center">
<h2 className="mt-6 text-3xl font-bold text-gray-900">
Welcome Back!
</h2>
<p className="mt-2 text-sm text-gray-500">
Please sign in to your account
</p>
</div>
{/* Sign-in form can be added here */}
</div>
</div>
</div>
</div>
);
};
export default ReusableComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment