-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
102 additions
and
26 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,24 @@ | ||
import { ReactNode } from "react"; | ||
|
||
export default function CardButton({ | ||
onClick, | ||
icon, | ||
text | ||
}: { | ||
onClick: () => Promise<void> | void; | ||
icon: ReactNode; | ||
text: string; | ||
}) { | ||
return ( | ||
<div className="flex flex-col flex-1/4 p-2 min-w-[25ch] max-w-[25ch]"> | ||
<div | ||
role="button" | ||
className="flex flex-col items-center space-y-2 justify-center p-2 border border-gray-300 hover:border-blue-200 hover:bg-gray-100 rounded-md text-center h-20" | ||
onClick={(e) => onClick()} | ||
> | ||
<div className="flex flex-col items-center justify-center">{icon}</div> | ||
<div>{text}</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { IconType } from "react-icons"; | ||
|
||
export default function DialogButton({ | ||
onClick, | ||
icon | ||
}: { | ||
onClick: any; | ||
icon: IconType; | ||
}) { | ||
const Icon = icon; | ||
return ( | ||
<div className="flex pointer-events-none sm:pointer-events-auto"> | ||
<button | ||
type="button" | ||
className="text-gray-400 hover:text-gray-500 focus:outline-none" | ||
onClick={onClick} | ||
> | ||
<Icon className="fill-gray-400 w-auto h-5" aria-hidden="true" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { IoMdHelp } from "react-icons/io"; | ||
|
||
export default function HelpLink({ link }: { link: string }) { | ||
return ( | ||
<a | ||
title="Link to documentation" | ||
href={`https://docs.flanksource.com/${link}`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="flex items-center justify-center text-gray-400 hover:text-gray-500 focus:outline-none" | ||
> | ||
<IoMdHelp size={22} className="inline-block" /> | ||
</a> | ||
); | ||
} |
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