* ui: fix performance bottlenecks, split data sources in devtools panes * ui: move xray warn * Player ux improvements (#2834) * Player UX improvements. DevTools (Including multi-tab) Actions panel (User events, Click maps, Tag Elements) * ui: remove unused imports, remove str templ classnames --------- Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com> --------- Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
import React from 'react';
|
|
import {Input, Button, Tooltip} from 'antd';
|
|
import {CloseOutlined, SearchOutlined} from '@ant-design/icons';
|
|
import { PlayerContext } from 'App/components/Session/playerContext';
|
|
|
|
function EventSearch(props) {
|
|
const { player } = React.useContext(PlayerContext);
|
|
|
|
const { onChange, value, header, setActiveTab, eventsText } = props;
|
|
|
|
const toggleEvents = () => player.toggleEvents();
|
|
|
|
return (
|
|
<div className="flex items-center w-full relative">
|
|
<div className="flex flex-1 flex-col">
|
|
<div className="flex items-center">
|
|
<Input
|
|
autoFocus
|
|
type="text"
|
|
placeholder={`Filter ${eventsText}`}
|
|
className="w-full rounded-lg"
|
|
name="query"
|
|
value={value}
|
|
onChange={onChange}
|
|
prefix={<SearchOutlined />}
|
|
/>
|
|
|
|
<Tooltip title="Close Panel" placement='bottom' >
|
|
<Button
|
|
className="ml-2"
|
|
type='text'
|
|
onClick={() => {
|
|
setActiveTab('');
|
|
toggleEvents();
|
|
}}
|
|
icon={<CloseOutlined />}
|
|
/>
|
|
</Tooltip>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default EventSearch;
|