MCPcopy
hub / github.com/vercel/hyper / render

Method render

lib/components/searchBox.tsx:31–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 };
30
31 render() {
32 return (
33 <div style={searchBoxStyling}>
34 <input type="text" className="search-box" onKeyUp={this.handleChange} ref={(input) => input?.focus()} />
35 <svg className="search-button" onClick={() => this.props.prev(this.searchTerm)}>
36 <use xlinkHref="./renderer/assets/search-icons.svg#left-arrow" />
37 </svg>
38 <svg className="search-button" onClick={() => this.props.next(this.searchTerm)}>
39 <use xlinkHref="./renderer/assets/search-icons.svg#right-arrow" />
40 </svg>
41 <svg className="search-button" onClick={() => this.props.close()}>
42 <use xlinkHref="./renderer/assets/search-icons.svg#cancel" />
43 </svg>
44 <style jsx>
45 {`
46 .search-box {
47 font-size: 18px;
48 padding: 3px 6px;
49 width: 152px;
50 border: none;
51 float: left;
52 }
53
54 .search-box:focus {
55 outline: none;
56 }
57
58 .search-button {
59 background-color: #ffffff;
60 color: black;
61 padding: 7px 5.5px;
62 text-align: center;
63 text-decoration: none;
64 display: inline-block;
65 font-size: 16px;
66 transition-duration: 0.4s;
67 cursor: pointer;
68 height: 27px;
69 width: 24px;
70 float: left;
71 }
72 .search-button:hover {
73 background-color: #e7e7e7;
74 }
75 `}
76 </style>
77 </div>
78 );
79 }
80}

Callers

nothing calls this directly

Calls 3

focusMethod · 0.80
nextMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected