Skip to content

Commit 3820ed9

Browse files
committed
fix passing error prop to styled component
1 parent bdd3403 commit 3820ed9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-drag-drop-files",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Light React Drag & Drop files and images library styled by styled-components",
55
"author": "Karim <[email protected]>",
66
"license": "MIT",

src/FileUploader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ const FileUploader: React.FC<Props> = (props: Props): JSX.Element => {
263263
{!children && (
264264
<>
265265
<ImageAdd />
266-
<DescriptionWrapper error={error}>
266+
<DescriptionWrapper $error={error}>
267267
{drawDescription(
268268
currFiles,
269269
uploaded,

src/style.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ export const HoverMsg = styled.div`
6868
*
6969
* @internal
7070
*/
71-
export const DescriptionWrapper = styled.div<{ error: boolean }>`
71+
export const DescriptionWrapper = styled.div<{ $error: boolean }>`
7272
display: flex;
7373
justify-content: space-between;
7474
flex-grow: 1;
7575
& > span {
7676
font-size: 12px;
77-
color: ${(props) => (props.error ? 'red' : darkGray)};
77+
color: ${(props) => (props.$error ? 'red' : darkGray)};
7878
}
7979
.file-types {
8080
overflow: hidden;

0 commit comments

Comments
 (0)