feat: added flag ;-; (#195)
Co-authored-by: Samuel Gunter <sgunter@utexas.edu>
This commit is contained in:
@@ -23,6 +23,8 @@ interface Props {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
|
export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
|
||||||
|
const longFlagName = Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text
|
<Text
|
||||||
as='div'
|
as='div'
|
||||||
@@ -31,7 +33,7 @@ export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
|
|||||||
style={{
|
style={{
|
||||||
backgroundColor: '#FFD600',
|
backgroundColor: '#FFD600',
|
||||||
}}
|
}}
|
||||||
title={Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label}
|
title={`${longFlagName} flag`}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user