Created Timeline component

Summary: This is a WIP component that displays the timeline of nav events to the user.

Reviewed By: jknoxville

Differential Revision: D16417087

fbshipit-source-id: 45a4bcdc271941d413c78fab2424628499c6d5ea
This commit is contained in:
Benjamin Elo
2019-07-23 03:22:53 -07:00
committed by Facebook Github Bot
parent f4e4dccd63
commit eeeb32efa9
3 changed files with 46 additions and 2 deletions

View File

@@ -7,13 +7,13 @@
*/
import {FlipperPlugin} from 'flipper';
import {SearchBar, ScrollableFlexColumn} from './components';
import {SearchBar, Timeline, ScrollableFlexColumn} from './components';
type State = {||};
type Data = {||};
type NavigationEvent = {|
export type NavigationEvent = {|
date: ?Date,
uri: ?string,
|};
@@ -69,12 +69,17 @@ export default class extends FlipperPlugin<State, {}, PersistedState> {
};
render() {
const {persistedState} = this.props;
return (
<ScrollableFlexColumn>
<SearchBar
onNavigate={this.navigateTo}
onFavorite={(query: string) => {}}
/>
<Timeline
events={persistedState.navigationEvents}
onNavigate={this.navigateTo}
/>
</ScrollableFlexColumn>
);
}