fix(ui) - flag height

This commit is contained in:
Shekar Siri 2023-03-29 15:43:05 +02:00
parent 57c3005548
commit a79f7a4531
2 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ function UserCard({ className, request, session, width, height, similarSessions,
render={() => (
<div className="text-left bg-white">
<SessionInfoItem
comp={<CountryFlag country={userCountry} />}
comp={<CountryFlag country={userCountry} height={11} />}
label={countries[userCountry]}
value={<span style={{ whiteSpace: 'nowrap' }}>{formatTimeOrDate(startedAt)}</span>}
/>

View file

@ -4,7 +4,7 @@ import { countries } from 'App/constants';
import { Icon } from 'UI';
import stl from './countryFlag.module.css';
const CountryFlag = ({ country = '', className = '', style = {}, label = false }) => {
const CountryFlag = ({ country = '', className = '', style = {}, label = false, width = 22, height = 15}) => {
const knownCountry = !!country && country !== 'UN';
const countryFlag = knownCountry ? country.toLowerCase() : '';
const countryName = knownCountry ? countries[ country ] : 'Unknown Country';
@ -12,7 +12,7 @@ const CountryFlag = ({ country = '', className = '', style = {}, label = false }
return (
<div className="flex items-center" style={style}>
{knownCountry
? <div className={ cn(`flag flag-${ countryFlag }`, className, stl.default) } />
? <div className={ cn(`flag flag-${ countryFlag }`, className) } style={{ width: `${width}px`, height: `${height}px` }} />
: (
<div className="flex items-center w-full">
<Icon name="flag-na" size="22" className="" />