UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

40 lines (39 loc) 1.81 kB
import { TextFieldProps } from '@mui/material/TextField'; import { AutocompleteProps } from '@mui/material'; import { SCContributionLocation } from '@selfcommunity/types/src/index'; export interface LocationAutocompleteProps extends Pick<AutocompleteProps<SCContributionLocation, false, false, true>, Exclude<keyof AutocompleteProps<SCContributionLocation, false, false, true>, 'options' | 'getOptionLabel' | 'filterOptions' | 'autoComplete' | 'includeInputInList' | 'filterSelectedOptions' | 'value' | 'selectOnFocus' | 'handleHomeEndKeys' | 'noOptionsText' | 'onChange' | 'onInputChange' | 'isOptionEqualToValue' | 'renderInput' | 'renderOption'>> { /** * The props applied to the text field. * @default {variant: 'outlined, label: location_label} */ TextFieldProps?: TextFieldProps; /** * Callback for change event on poll object * @param value * @default null */ onChange?: (value: any) => void; } /** * > API documentation for the Community-JS Location Autocomplete component. Learn about the available props and the CSS API. * * * This component renders a bar that allows users to search (with autocomplete) for cities names. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/LocationAutocomplete) * * #### Import * ```jsx * import {LocationAutocomplete} from '@selfcommunity/react-ui'; * ``` * #### Component Name * The name `SCLocationAutocomplete` can be used when providing style overrides in the theme. * * #### CSS * * |Rule Name|Global class|Description| * |---|---|---| * |root|.SCLocationAutocomplete-root|Styles applied to the root element.| * * @param inProps */ export default function LocationAutocomplete(inProps: LocationAutocompleteProps): JSX.Element;