Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 8f44da9

Browse files
committed
docs(Docs): Add docs for buttonProps
Add docs and typescript definition for button props re #152
1 parent 56e2878 commit 8f44da9

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ If you like the tag list like [React-Select](https://github.com/JedWatson/react-
2828
You can also achieve the same result with a great deal of flexibility using [Paypal's Downshift](https://github.com/paypal/downshift#usage).
2929

3030
### More on React Select
31-
React Select V2 is pretty incredible, you can replace and provide custom functionality for almost every element of the select component. With a little work you could rebuild Picky from the components of React Select, take a look at [React Select: Experimental](https://react-select.com/advanced#experimental), the Popout example is close to what Picky does. You could even build a date picker in React Select...**HOW COOL IS THAT!**
3231

32+
React Select V2 is pretty incredible, you can replace and provide custom functionality for almost every element of the select component. With a little work you could rebuild Picky from the components of React Select, take a look at [React Select: Experimental](https://react-select.com/advanced#experimental), the Popout example is close to what Picky does. You could even build a date picker in React Select...**HOW COOL IS THAT!**
3333

3434
## What Picky is
35-
Picky provides a medium amount of flexibility, you can custom render: Options, List (useful for creating a virtualized menu), and SelectAll. Any further customisation and it's a little out of scope for Picky. It was built with a common pattern in mind so you can get up and running with little-to-no work. If you need Picky to be more flexible, I'm happy to take a PR if it would benefit the rest of the community.
35+
36+
Picky provides a medium amount of flexibility, you can custom render: Options, List (useful for creating a virtualized menu), and SelectAll. Any further customisation and it's a little out of scope for Picky. It was built with a common pattern in mind so you can get up and running with little-to-no work. If you need Picky to be more flexible, I'm happy to take a PR if it would benefit the rest of the community.
3637

3738
# Peer Dependencies
3839

@@ -168,6 +169,7 @@ Picky.propTypes = {
168169
- `filterPlaceholder` - Override the filter placeholder. Defaults to 'Filter...'
169170
- `getFilterValue` - Will provide the input value of filter to the picky dropdown, so that if we have a larger list of options then we can only supply the matching options based on this value.
170171
- `caseSensitiveFilter` - If true options will be returned when they match case
172+
- `buttonProps` - Additional props to apply the the button component, useful for supplying class names.
171173

172174
## Custom rendering
173175

index.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,17 @@ declare module 'react-picky' {
385385
* If true options will be returned when they match case, defaults to false
386386
*/
387387
caseSensitiveFilter?: boolean;
388+
389+
/**
390+
* Pass additional props the the button component
391+
*
392+
* @type {React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>}
393+
* @memberof PickyProps
394+
*/
395+
buttonProps?: React.DetailedHTMLProps<
396+
React.ButtonHTMLAttributes<HTMLButtonElement>,
397+
HTMLButtonElement
398+
>;
388399
}
389400

390401
export default class Picky extends React.PureComponent<PickyProps, any> {

0 commit comments

Comments
 (0)