-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: created an empty list custom component
Signed-off-by: bhavanakarwade <[email protected]>
- Loading branch information
1 parent
9776f17
commit 00c533b
Showing
8 changed files
with
211 additions
and
174 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { ReactElement } from "react"; | ||
|
||
export const EmptyListMessage = ({ message, description, buttonContent, svgComponent, onClick } | ||
: { | ||
message: string, | ||
description: string, | ||
buttonContent?: string, | ||
svgComponent?: ReactElement, | ||
|
||
onClick?: () => void, | ||
}) => { | ||
return ( | ||
<div className='flex mt-20 justify-start items-center flex-col'> | ||
<p className='text-2xl font-bold mb-4'>{message}</p> | ||
<p className='text-lg mb-4'>{description}</p> | ||
{ | ||
buttonContent | ||
&& <button | ||
className='group flex h-min p-3 mt-10 items-center justify-center p-0.5 font-medium focus:z-10 border border-transparent enabled:hover:bg-cyan-800 dark:enabled:hover:bg-cyan-700 text-base font- text-center text-white bg-primary-700 rounded-lg hover:bg-accent-00 focus:ring-4 focus:ring-primary-300 sm:w-auto dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"' | ||
onClick={onClick}> | ||
{svgComponent} | ||
<span className="ml-2">{buttonContent}</span> | ||
</button> | ||
} | ||
|
||
</div> | ||
) | ||
}; | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.