Socket
Socket
Sign inDemoInstall

@dylmye/mui-google-places-autocomplete

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dylmye/mui-google-places-autocomplete

Google places autocomplete input for MUI library in React.


Version published
Weekly downloads
60
increased by445.45%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

MUI Google Places Autocomplete

React component for easily use Google Places Autocomplete, which uses the MUI React Autocomplete component.

A fork of Nicolas Tinte's brilliant component, which uses react-select.

Warning
This is currently pre-production - don't expect it to work right now.

a screenshot showing the component in action.

Getting started

Install the latest version:

npm install --save mui-google-places-autocomplete
  or
yarn add mui-google-places-autocomplete

Use the component:

import React from "react";
import GooglePlacesAutocomplete from "@dylmye/mui-google-places-autocomplete";

const Component = () => (
  <div>
    <GooglePlacesAutocomplete apiKey="****" />
  </div>
);

export default Component;

Or with Formik:

import React from "react";
import { Formik, Form, Field } from "formik";
import { GooglePlacesAutocompleteField } from "@dylmye/mui-google-places-autocomplete";

const MyForm = () => (
  <Formik onSubmit={console.log}>
    <Form>
      <Field
        name="location"
        component={GooglePlacesAutocompleteField}
        apiKey="****"
      />
    </Form>
  </Formik>
);

export default MyForm;

Documentation

Read The Docs

How to contribute?

  1. Fork this repo

  2. Clone your fork

  3. Code 🤓

  4. Test your changes

    For this, I like to use yalc, as it allows to emulate the process of using npm/yarn.

    1. Install yalc
    2. Build project with yarn build or npm run build
    3. Publish the package with yalc: yalc publish
    4. Add the package to your test project yalc add @dylmye/mui-google-places-autocomplete
    5. If needed, to update the package on your test project: yalc update @dylmye/mui-google-places-autocomplete
  5. Submit a PR!



Icons made by Freepik from www.flaticon.com

Keywords

FAQs

Last updated on 07 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc