mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Styling
This commit is contained in:
23
ui/v2.5/src/components/Shared/ImageInput.tsx
Normal file
23
ui/v2.5/src/components/Shared/ImageInput.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
import { Button, Form } from 'react-bootstrap';
|
||||
|
||||
interface IImageInput {
|
||||
isEditing: boolean;
|
||||
onImageChange: (event: React.FormEvent<HTMLInputElement>) => void;
|
||||
}
|
||||
|
||||
export const ImageInput: React.FC<IImageInput> = ({ isEditing, onImageChange }) => {
|
||||
if (!isEditing) return <div />;
|
||||
|
||||
return (
|
||||
<Form.Label className="image-input">
|
||||
<Button variant="secondary">Browse for image...</Button>
|
||||
<Form.Control
|
||||
type="file"
|
||||
onChange={onImageChange}
|
||||
accept=".jpg,.jpeg,.png"
|
||||
/>
|
||||
</Form.Label>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user