import * as React from "react"; import { PhoneInput, COUNTRIES, StyledFlag } from "baseui/phone-input"; function CustomFlag(props: any) { const { children, ...rest } = props; return ; } export default function Example() { const [text, setText] = React.useState(""); const [country, setCountry] = React.useState(COUNTRIES.US); return ( { setText(event.currentTarget.value); }} onCountryChange={(event: any) => { setCountry(event.option); }} overrides={{ FlagContainer: { component: CustomFlag, }, }} /> ); }