-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix infopill variants and skip-length
- Loading branch information
1 parent
6725070
commit 513031a
Showing
5 changed files
with
48 additions
and
18 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 |
---|---|---|
|
@@ -152,7 +152,7 @@ | |
|
||
.main { | ||
grid-area: main; | ||
overflow-y: scroll; | ||
overflow: scroll; | ||
height: 100%; | ||
} | ||
|
||
|
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,18 +1,28 @@ | ||
import { ReactElement } from "react"; | ||
|
||
interface InfoPill { | ||
export type InfoPillProps = { | ||
text: string; | ||
icon: ReactElement; | ||
colors: string; | ||
} | ||
variant: InfoPillVariant; | ||
}; | ||
|
||
export type InfoPillVariant = "wide" | "medium" | "narrow" | "none"; | ||
|
||
export default function InfoPill({ text, icon, colors }: InfoPill) { | ||
return ( | ||
export default function InfoPill({ | ||
text, | ||
icon, | ||
colors, | ||
variant, | ||
}: InfoPillProps) { | ||
return variant == "none" ? ( | ||
<></> | ||
) : ( | ||
<div | ||
className={`flex flex-row gap-0.5 detail-pill-text p-0.5 items-center w-fit h-4 rounded-sm ${colors}`} | ||
> | ||
{icon} | ||
<p>{text}</p> | ||
{(variant == "wide" || variant == "narrow") && icon} | ||
{(variant == "wide" || variant == "medium") && <p>{text}</p>} | ||
</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