-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
3498ec3
commit 574cad8
Showing
7 changed files
with
166 additions
and
27 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { FC, ReactElement } from 'react' | ||
|
||
type ChipProps = { | ||
index: number, | ||
children?: ReactElement | ReactElement[] | string | ||
} | ||
|
||
export const Chip: FC<ChipProps> = ({ index, children }) => { | ||
switch (index % 7) { | ||
case 0: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-blue-500 to-violet-500"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 1: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-slate-600 to-slate-300"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 2: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-blue-700 to-cyan-500"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 3: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-red-600 to-orange-600"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 4: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-green-500 to-teal-500"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 5: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-gray-400 to-gray-100"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
case 6: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-zinc-800 to-zinc-700"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-white whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
default: | ||
return <span | ||
className="p-px inline-block rounded bg-gradient-to-tl from-green-500 to-teal-500"> | ||
<span className="block bg-[--bg-color] leading-none p-1.5 rounded text-center text-xs text-emerald-400 whitespace-nowrap"> | ||
{children} | ||
</span> | ||
</span> | ||
} | ||
} |
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,18 @@ | ||
import {FC} from "react"; | ||
|
||
type PluginAuthorProps = { | ||
email: string, | ||
name: string, | ||
} | ||
|
||
export const PluginAuthorComp: FC<PluginAuthorProps> = ({email,name})=>{ | ||
|
||
|
||
if (email && name){ | ||
return <a href={"mailto:"+email}><span className="text-primary">Author:</span> {name}</a> | ||
} else if (name){ | ||
return <span><span className="text-primary">Author:</span> {name}</span> | ||
} | ||
return <span>No Author</span> | ||
|
||
} |
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