-
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.
Merge pull request #64 from credebl/57-empty-list-custom-component
Created Empty List Custom Component
- Loading branch information
Showing
10 changed files
with
378 additions
and
287 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.