feat: added flag ;-; (#195)

Co-authored-by: Samuel Gunter <sgunter@utexas.edu>
This commit is contained in:
2024-03-22 19:12:06 -05:00
committed by GitHub
parent 5b1e4513e2
commit 9b4d61c2b0

View File

@@ -23,6 +23,8 @@ interface Props {
* @returns
*/
export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
const longFlagName = Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label;
return (
<Text
as='div'
@@ -31,7 +33,7 @@ export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
style={{
backgroundColor: '#FFD600',
}}
title={Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label}
title={`${longFlagName} flag`}
>
{label}
</Text>