mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 14:52:13 +00:00
VideosList uses SearchBar component
This commit is contained in:
parent
e8553454c2
commit
28badaa964
2 changed files with 9 additions and 50 deletions
|
|
@ -1,9 +1,8 @@
|
|||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const classnames = require('classnames');
|
||||
const Icon = require('stremio-icons/dom');
|
||||
const Image = require('stremio/common/Image');
|
||||
const TextInput = require('stremio/common/TextInput');
|
||||
const SearchBar = require('stremio/common/SearchBar');
|
||||
const SeasonsBar = require('./SeasonsBar');
|
||||
const Video = require('./Video');
|
||||
const useSelectableSeasons = require('./useSelectableSeasons');
|
||||
|
|
@ -30,6 +29,7 @@ const VideosList = ({ className, metaResource }) => {
|
|||
!metaResource || metaResource.content.type === 'Loading' ?
|
||||
<React.Fragment>
|
||||
<SeasonsBar.Placeholder className={styles['seasons-bar']} />
|
||||
<SearchBar.Placeholder className={styles['search-bar']} title={'Search videos'} />
|
||||
<div className={styles['videos-scroll-container']}>
|
||||
<Video.Placeholder />
|
||||
<Video.Placeholder />
|
||||
|
|
@ -57,16 +57,12 @@ const VideosList = ({ className, metaResource }) => {
|
|||
:
|
||||
null
|
||||
}
|
||||
<label title={'Search videos'} className={styles['search-bar-container']}>
|
||||
<TextInput
|
||||
className={styles['search-input']}
|
||||
type={'text'}
|
||||
placeholder={'Search videos'}
|
||||
value={search}
|
||||
onChange={searchInputOnChange}
|
||||
/>
|
||||
<Icon className={styles['icon']} icon={'ic_search'} />
|
||||
</label>
|
||||
<SearchBar
|
||||
className={styles['search-bar']}
|
||||
title={'Search videos'}
|
||||
search={search}
|
||||
searchInputOnChange={searchInputOnChange}
|
||||
/>
|
||||
<div className={styles['videos-container']}>
|
||||
{
|
||||
videosForSeason
|
||||
|
|
|
|||
|
|
@ -37,51 +37,14 @@
|
|||
align-self: stretch;
|
||||
}
|
||||
|
||||
.search-bar-container {
|
||||
.search-bar {
|
||||
flex: none;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 3.5rem;
|
||||
padding: 0 1rem;
|
||||
margin: 0 1.5rem 1rem 1.5rem;
|
||||
border-radius: 3.5rem;
|
||||
border: var(--focus-outline-size) solid transparent;
|
||||
background-color: @color-background;
|
||||
cursor: text;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
&:hover, &:focus-within {
|
||||
background-color: @color-background-light1;
|
||||
}
|
||||
|
||||
&:focus-within {
|
||||
border: var(--focus-outline-size) solid @color-surface-light5;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
margin-right: 1rem;
|
||||
font-size: 1.1rem;
|
||||
color: @color-surface-light5;
|
||||
|
||||
&::placeholder {
|
||||
max-height: 1.2em;
|
||||
opacity: 1;
|
||||
color: @color-secondaryvariant1-light1-90;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
flex: none;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
fill: @color-secondaryvariant1-90;
|
||||
}
|
||||
}
|
||||
|
||||
.videos-container {
|
||||
|
|
|
|||
Loading…
Reference in a new issue