Skip to content

Commit

Permalink
added props
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomcv committed Jul 19, 2020
1 parent df94c14 commit 91ac61a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/LocationSelector/LocationSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import React, { FunctionComponent } from 'react';
import React, { FunctionComponent, ChangeEventHandler } from 'react';
import './LocationSelector.scss';

const LocationSelector: FunctionComponent = () => (
<select className="location-selector">
interface LocationSelectorProps {
onChange: ChangeEventHandler<HTMLSelectElement>;
value: string;
}

const LocationSelector: FunctionComponent<LocationSelectorProps> = ({ onChange, value }) => (
<select
className="location-selector"
onChange={onChange}
value={value}
>
<option value="london">
London
</option>
Expand Down

0 comments on commit 91ac61a

Please sign in to comment.