Skip to content

Commit 5b2ef18

Browse files
committed
[REF]: refactor Readme file
1 parent 5662fbe commit 5b2ef18

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,18 @@ Yes, it's really all you need to get started as you can see in these live and in
117117

118118
### Props
119119

120-
| Name | Type | Default | Description | |
121-
| ------------- | -------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
122-
| file | `File` | `undefined` | The actual file |
123-
| hd | `boolean` | `undefined` | If present, preview on full screen will be presented in the real image resolution |
124-
| id | `string` \| `number` | `undefined` | identifier for the file |
125-
| info | `boolean` | `false` | whether to show the info layer or not also whether to make visible the info button or not |
126-
| onDelete | `Function` | `undefined` | A `Function` of what to do when close button is pressed or clicked |
127-
| onSee | `Function` | `undefined` | A function of what to do when "see" button is pressed or clicked |
128-
| preview | `boolean` | `false` | `undefined` |
129-
| uploadMessage | `string` | `undefined` | The message to display when server responds |
130-
| uploadStatus | `undefined` \| `"uploading"` \| `"success"` \| `"error"` | `undefined` | The status of the upload process |
131-
| valid | `boolean` | `false` | whether to show a "valid" or "rejected" message ("valid", "denied") by def. valid is `false` (if not present, it's `false` too)This value wil affect preview behaviour, If not valid, the preview will not be shown, nor the view button |
120+
| Name | Type | Default | Description | |
121+
| ------------- | -------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
122+
| file | `File` | `undefined` | The actual file |
123+
| hd | `boolean` | `undefined` | If present, preview on full screen will be presented in the real image resolution |
124+
| id | `string` \| `number` | `undefined` | identifier for the file |
125+
| info | `boolean` | `false` | If present, the info layer and the info button will ve visible |
126+
| onDelete | `Function` | `undefined` | A `Function` of what to do when close button is pressed or clicked |
127+
| onSee | `Function` | `undefined` | A `Function` of what to do when "see" button is pressed or clicked. Returns as first parameter the image url. If `hd` present, will return the image url in the real quality. Otherwise, will return a minimized image with less resolution in order to save memory. |
128+
| preview | `boolean` | `false` | If present, and if `onSee` present, "see" button will be visible and on click will trigger `onSee` function |
129+
| uploadMessage | `string` | `undefined` | The message to display when server responds |
130+
| uploadStatus | `undefined` \| `"uploading"` \| `"success"` \| `"error"` | `undefined` | The status of the upload process |
131+
| valid | `boolean` | `false` | whether to show a "valid" or "rejected" message ("valid", "denied"). By default valid is `false` (if not present, it's `false` too)This value will affect preview behaviour. If not valid, the preview will not be shown, nor the view button even when `onSee` and `preview` props are present. To make a preview despite of the image file in not valid, is a feaure that will be added in future releases. |
132132

133133
## FullScreenPreview API
134134

@@ -138,7 +138,7 @@ Yes, it's really all you need to get started as you can see in these live and in
138138
| --------- | ---------- | ----------- | --------------------------------------------- |
139139
| imgSource | `string` | `undefined` | The url string representation of the image |
140140
| onClose | `Function` | `undefined` | A function that describes the close behaviour |
141-
| openImage | `boolean` | `false` | Whether to open the image preview |
141+
| openImage | `boolean` | `false` | Flag that indicates whether to open the image preview or close it |
142142

143143
## FileItemContainer API
144144

@@ -157,15 +157,15 @@ Yes, it's really all you need to get started as you can see in these live and in
157157
| ----------- | ------------------------------------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
158158
| accept | `string` | `undefined` | The list of mimetypes and extensions of files to accept. This is a comma separated list of mime types or file extensions. Eg.: image/\*,application/pdf,.psd |
159159
| color | `string` | `"#071e25"` | The main color for the button. (e.g. "#FFFFFF", "rgb(255,12,45)") |
160-
| disabled | | | whether the button will be disabled or not |
160+
| disabled | `boolean` | `false` | whether the button will be disabled or not |
161161
| id | `string` | `undefined` | the id of the component |
162162
| label | `string` | "Browse ..." | If given, this label will be shwed inside the button |
163163
| maxFileSize | `number` | `undefined` | max file size allowed in bytes |
164164
| multiple | `boolean` | `false` | whether to accept multiple files or not |
165-
| onChange | `Function` | `undefined` | What to do after selecting the files. Returns the File[] to the parent component |
165+
| onChange | `Function` | `undefined` | What to do after selecting the files. Returns the File[] to the parent component |
166166
| style | `React.CSSProperties` | {} | the in-line style object |
167167
| text | `"uppercase"` \| `"capitalize"` \| `"lowercase"` \| `"none"` | `"capitalize"` | the text transfor for the button label |
168-
| textColor | `string` | "white" | The font color in case variant is `"contained"` |
168+
| textColor | `string` | "white" | The font color in case variant is `"contained"` |
169169
| validator | (f: `File`) => `boolean` | `undefined` | must be a function that recieves as first parameter a File Object and must return a boolean value. This function will be used instead of the default validator |
170170
| variant | `"text"` \| `"outlined"` \| `"contained"` | `"contained"` | The variant of the button |
171171

0 commit comments

Comments
 (0)