* 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>
22 lines
No EOL
647 B
TypeScript
22 lines
No EOL
647 B
TypeScript
import React from 'react'
|
|
import { Segmented } from 'antd'
|
|
import { useStore } from 'App/mstore';
|
|
import { observer } from 'mobx-react-lite';
|
|
|
|
function TabSelector() {
|
|
const { uiPlayerStore } = useStore();
|
|
const currentValue = uiPlayerStore.dataSource;
|
|
const options = [
|
|
{ label: 'All Tabs', value: 'all' },
|
|
{ label: 'Current Tab', value: 'current' }
|
|
]
|
|
|
|
const onChange = (value: 'all' | 'current') => {
|
|
uiPlayerStore.changeDataSource(value)
|
|
}
|
|
return (
|
|
<Segmented options={options} value={currentValue} onChange={onChange} className='font-medium rounded-lg' size='small' />
|
|
)
|
|
}
|
|
|
|
export default observer(TabSelector) |