-
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.
- Loading branch information
Showing
3 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 +1,28 @@ | ||
export function Pill({ children }: { children: React.ReactNode }) { | ||
export function Pill({ | ||
children, | ||
tag, | ||
}: { | ||
children: React.ReactNode | ||
tag?: boolean | ||
}) { | ||
return ( | ||
<div className="bg-tertiary hover:bg-primary hover:text-tertiary rounded px-2 py-0.5 transition-colors"> | ||
{children} | ||
<div className="flex transition-colors"> | ||
<div | ||
className={`${tag ? 'rounded-s' : 'hover:bg-primary hover:text-tertiary cursor-pointer rounded'} bg-tertiary text-primary px-2 py-0.5 capitalize`} | ||
> | ||
{children} | ||
</div> | ||
{tag && ( | ||
<button className="bg-primary hover:bg-secondary rounded-e px-2"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"> | ||
<path | ||
fill="#FFF" | ||
fill-rule="evenodd" | ||
d="M11.314 0l2.121 2.121-4.596 4.596 4.596 4.597-2.121 2.121-4.597-4.596-4.596 4.596L0 11.314l4.596-4.597L0 2.121 2.121 0l4.596 4.596L11.314 0z" | ||
/> | ||
</svg> | ||
</button> | ||
)} | ||
</div> | ||
) | ||
} |