Selected Country Component
fun SelectedCountryComponent(modifier: Modifier = Modifier, selectedCountry: Country? = countryList.find { it.code == "US" }, onSelectCountry: (Country) -> Unit = {}, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig(), onDropdownExpand: () -> Unit? = null)(source)
Displays the currently selected country (flag + dial code) and opens a CountriesBottomSheet when tapped.
Parameters
modifier
Modifier applied to the surface.
selected Country
Country to display; falls back to US if null.
on Select Country
Triggered when the user picks a country.
countries To Show
Whitelist of ISO codes shown in the sheet.
countries Exclude
Blacklist of ISO codes hidden from the sheet.
pinned Countries
ISO codes pinned to the top "Suggested" section.
ccp Colors
Color configuration.
ccp Config
Behavior and UI configuration.