-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typescript Integration
- Loading branch information
Showing
76 changed files
with
2,427 additions
and
2,100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
APP_NAME=Laravel | ||
APP_NAME="Ping CRM" | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
|
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
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import 'components/form'; | ||
/* @import 'components/form'; */ | ||
@import 'components/button'; | ||
|
||
@tailwind base; | ||
|
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,50 @@ | ||
import React from 'react'; | ||
import { Check, CircleX, TriangleAlert } from 'lucide-react'; | ||
import CloseButton from '@/Components/Button/CloseButton'; | ||
|
||
interface Alert { | ||
message: string; | ||
icon?: React.ReactNode; | ||
action?: React.ReactNode; | ||
onClose?: () => void; | ||
variant?: 'success' | 'error' | 'warning'; | ||
} | ||
|
||
export default function Alert({ | ||
icon, | ||
action, | ||
message, | ||
variant, | ||
onClose | ||
}: Alert) { | ||
const color = { | ||
success: 'green', | ||
error: 'red', | ||
warning: 'yellow' | ||
}[variant || 'success']; | ||
|
||
const backGroundColor = { | ||
success: 'bg-green-500 text-white', | ||
error: 'bg-red-500 text-white', | ||
warning: 'bg-yellow-500 text-yellow-800' | ||
}[variant || 'success']; | ||
|
||
const iconComponent = { | ||
success: <Check size={20} />, | ||
error: <CircleX size={20} />, | ||
warning: <TriangleAlert size={20} /> | ||
}[variant || 'success']; | ||
|
||
return ( | ||
<div | ||
className={`${backGroundColor} px-4 mb-8 flex items-center justify-between rounded max-w-3xl`} | ||
> | ||
<div className="flex items-center space-x-2"> | ||
{icon || iconComponent} | ||
<div className="py-4 text-sm font-medium">{message}</div> | ||
</div> | ||
{action} | ||
{onClose && <CloseButton onClick={onClose} color={color} />} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.