New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@rpldy/upload-button

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rpldy/upload-button - npm Package Compare versions

Comparing version

to
0.1.8

{
"version": "0.1.7",
"version": "0.1.8",
"name": "@rpldy/upload-button",

@@ -19,7 +19,7 @@ "description": "",

"dependencies": {
"@rpldy/shared-ui": "^0.1.7"
"@rpldy/shared-ui": "^0.1.8"
},
"devDependencies": {
"@rpldy/retry": "^0.1.7",
"@rpldy/uploady": "^0.1.7",
"@rpldy/retry": "^0.1.8",
"@rpldy/uploady": "^0.1.8",
"@storybook/addon-knobs": "^5.3.18",

@@ -36,3 +36,3 @@ "flow-bin": "^0.121.0",

},
"gitHead": "0ac67a2893ef3a684b8cf1834590035065340366"
"gitHead": "20fa09a7a5ffa89c05d892175d5d0d9b4d6821cf"
}

@@ -14,14 +14,28 @@ # Upload Button

```shell
$ yarn add @rpldy/uploady @rpldy/upload-button
```
>
Or
```shell
$ npm i @rpldy/uploady @rpldy/upload-button
```
## Props
| Name (* = mandatory) | Type | Default | Description
| -------------- | ------------- | ------------- | -------------
| id | string | undefined | id attribute to pass to the button element
| text | string | "Upload" | the button text (in case no children passed)
| className | string | undefined | the class attribute to pass to the button element
| children | React.Node | undefined | child element(s) to render inside the button (replaces text)
| extraProps | Object | undefined | any other props to pass to the button component (with spread)
| ref | React ref | undefined will be passed to the button element to acquire a ref
In addition, most [UploadOptions](../../shared/src/types.js#L104) props can be passed to UploadButton.
In order to override configuration passed to the parent Uploady component.
See [Uploady documentation](../uploady#props) for detailed list of upload options.
The following [guide](../../../guides/DifferentConfiguration.md) shows how different upload buttons may use different upload options.
## Example

@@ -35,3 +49,2 @@

```javascript
import React from "react";

@@ -54,3 +67,2 @@ import Uploady from "@rpldy/uploady";

```javascript
import React from "react";

@@ -71,19 +83,2 @@ import Uploady from "@rpldy/uploady";

```
## Props
| Name (* = mandatory) | Type | Default | Description
| -------------- | ------------- | ------------- | -------------
| id | string | undefined | id attribute to pass to the button element
| text | string | "Upload" | the button text (in case no children passed)
| className | string | undefined | the class attribute to pass to the button element
| children | React.Node | undefined | child element(s) to render inside the button (replaces text)
| extraProps | Object | undefined | any other props to pass to the button component (with spread)
| ref | React ref | undefined will be passed to the button element to acquire a ref
In addition, most [UploadOptions](../../shared/src/types.js#L104) props can be passed to UploadButton.
In order to override configuration passed to the parent Uploady component.
See [Uploady documentation](../uploady#props) for detailed list of upload options.
The following [guide](../../../guides/DifferentConfiguration.md) shows how different upload buttons may use different upload options.
```