some stolen code hehehe
This commit is contained in:
parent
f9b2953bce
commit
725b94bb23
58
data.json
58
data.json
@ -1,19 +1,53 @@
|
||||
{
|
||||
"posts": [
|
||||
"categories": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "json-server",
|
||||
"author": "typicode"
|
||||
}
|
||||
],
|
||||
"comments": [
|
||||
"name": "Драма",
|
||||
"img": "./static/images/cover-golodnye-igry.jpg"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"body": "some comment",
|
||||
"postId": 1
|
||||
"id": 2,
|
||||
"name": "Комедия",
|
||||
"img": "./static/images/cover-marriage-story.jpg"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Боевик",
|
||||
"img": "./static/images/cover-narkoz.jpg"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Триллер",
|
||||
"img": "./static/images/cover-posle-glava-2.jpg"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Фантастика",
|
||||
"img": "./static/images/cover-split.jpg"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Детектив",
|
||||
"img": "./static/images/cover-anna-detektiv.jpg"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Мюзикл",
|
||||
"img": "./static/images/cover-placeholder160x230.png"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Аниме",
|
||||
"img": "./static/images/cover-placeholder160x230.png"
|
||||
}
|
||||
],
|
||||
"profile": {
|
||||
"name": "typicode"
|
||||
}
|
||||
"movies": [
|
||||
{
|
||||
"name": "Терминатор",
|
||||
"categoryId": "3",
|
||||
"duration": "2:27",
|
||||
"description": "Мальчик и девочка из Омерики спасают мир от нашествия машин под предводительством искусственного интеллекта",
|
||||
"image": "src/assets/akademy-ambrella.jpeg"
|
||||
}
|
||||
]
|
||||
}
|
BIN
src/assets/200.png
Normal file
BIN
src/assets/200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@ -1,8 +1,10 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import imgPlaceholder from '../../../assets/200.png';
|
||||
import imgPlaceholder from '../../assets/200.png';
|
||||
import Input from '../../input/Input.jsx';
|
||||
import Select from '../../input/Select.jsx';
|
||||
import useTypes from '../../types/hooks/TypesHook';
|
||||
import useTypes from '../types/hooks/TypesHook';
|
||||
// import Select
|
||||
// import Input
|
||||
import './LinesItemForm.css';
|
||||
|
||||
const LinesItemForm = ({ item, handleChange }) => {
|
||||
@ -14,12 +16,14 @@ const LinesItemForm = ({ item, handleChange }) => {
|
||||
<img id='image-preview' className='rounded' alt='placeholder'
|
||||
src={item.image || imgPlaceholder} />
|
||||
</div>
|
||||
<Select values={types} name='typeId' label='Товары' value={item.typeId} onChange={handleChange}
|
||||
<Select values={types} name='category' label='Жанр' value={item.category} onChange={handleChange}
|
||||
required />
|
||||
<Input name='price' label='Цена' value={item.price} onChange={handleChange}
|
||||
type='number' min='1000.0' step='0.50' required />
|
||||
<Input name='count' label='Количество' value={item.count} onChange={handleChange}
|
||||
type='number' min='1' step='1' required />
|
||||
<Input name='name' label='Название' value={item.name} onChange={handleChange}
|
||||
type='text' required />
|
||||
<Input name='description' label='Описание' value={item.description} onChange={handleChange}
|
||||
type='text' required />
|
||||
<Input name='duration' label='Длительность' value={item.duration} onChange={handleChange}
|
||||
type='text' required />
|
||||
<Input name='image' label='Изображение' onChange={handleChange}
|
||||
type='file' accept='image/*' />
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user