mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
SearchBarPlaceholder implemented
This commit is contained in:
parent
55bacef0a1
commit
e8553454c2
3 changed files with 49 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const classnames = require('classnames');
|
||||
const Icon = require('stremio-icons/dom');
|
||||
const styles = require('./styles');
|
||||
|
||||
const SearchBarPlaceholder = ({ className, title }) => {
|
||||
return (
|
||||
<div className={classnames(className, styles['search-bar-container'])}>
|
||||
<div className={styles['search-input']}>{title}</div>
|
||||
<Icon className={styles['icon']} icon={'ic_search'} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
SearchBarPlaceholder.propTypes = {
|
||||
className: PropTypes.string,
|
||||
title: PropTypes.string
|
||||
};
|
||||
|
||||
module.exports = SearchBarPlaceholder;
|
||||
3
src/common/SearchBar/SearchBarPlaceholder/index.js
Normal file
3
src/common/SearchBar/SearchBarPlaceholder/index.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
const SearchBarPlaceholder = require('./SearchBarPlaceholder');
|
||||
|
||||
module.exports = SearchBarPlaceholder;
|
||||
25
src/common/SearchBar/SearchBarPlaceholder/styles.less
Normal file
25
src/common/SearchBar/SearchBarPlaceholder/styles.less
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
.search-bar-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
height: 3.5rem;
|
||||
padding: 0 1rem;
|
||||
border-radius: 3.5rem;
|
||||
border: var(--focus-outline-size) solid transparent;
|
||||
background-color: var(--color-placeholder-background);
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
max-height: 1.2em;
|
||||
margin-right: 1rem;
|
||||
font-size: 1.1rem;
|
||||
color: var(--color-placeholder-text);
|
||||
}
|
||||
|
||||
.icon {
|
||||
flex: none;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
fill: var(--color-placeholder-background);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue