Skip to content

Commit

Permalink
fix(typings): Make optional props of Search, optional in the typing d…
Browse files Browse the repository at this point in the history
…efinition.
  • Loading branch information
koenvg committed Mar 2, 2017
1 parent b12a368 commit 0db8c24
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/Search/Search.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { default as SearchCategory, SearchCategoryProps} from './SearchCategory';
import { default as SearchCategory, SearchCategoryProps } from './SearchCategory';
import { default as SearchResult, SearchResultProps } from './SearchResult';
import { default as SearchResults } from './SearchResults';

Expand Down Expand Up @@ -80,39 +80,39 @@ interface SearchProps {
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onBlur: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;
onBlur?: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;

/**
* Called on focus.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onFocus: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;
onFocus?: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;

/**
* Called on mousedown.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onMouseDown: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;
onMouseDown?: (event: React.MouseEvent<HTMLElement>, data: SearchProps) => void;

/**
* Called when a result is selected.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onResultSelect: (event: React.MouseEvent<HTMLDivElement>, data: SearchResultProps) => void;
onResultSelect?: (event: React.MouseEvent<HTMLDivElement>, data: SearchResultProps) => void;

/**
* Called on search input change.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {string} value - Current value of search input.
*/
onSearchChange: (event: React.MouseEvent<HTMLElement>, value: string) => void;
onSearchChange?: (event: React.MouseEvent<HTMLElement>, value: string) => void;

// ------------------------------------
// Style
Expand All @@ -131,7 +131,7 @@ interface SearchProps {
fluid?: boolean;

/** A search input can take up the width of its container. */
input: any;
input?: any;

/** A search can show a loading indicator. */
loading?: boolean;
Expand Down

0 comments on commit 0db8c24

Please sign in to comment.