mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
Presentational components, events, tabs and more
This commit is contained in:
@@ -9,24 +9,19 @@ import {
|
||||
TabPane,
|
||||
} from "talk-ui/components";
|
||||
|
||||
import { SetActiveTabMutation } from "talk-stream/mutations";
|
||||
|
||||
import CommentsPaneContainer from "../tabs/comments/containers/CommentsPaneContainer";
|
||||
import ProfileQuery from "../tabs/profile/queries/ProfileQuery";
|
||||
import * as styles from "./App.css";
|
||||
|
||||
export interface AppProps {
|
||||
activeTab: "COMMENTS" | "PROFILE" | "%future added value" | string;
|
||||
onActiveTab: SetActiveTabMutation;
|
||||
activeTab: "COMMENTS" | "PROFILE" | "%future added value";
|
||||
onTabClick: (tab: string) => void;
|
||||
}
|
||||
|
||||
const App: StatelessComponent<AppProps> = props => {
|
||||
return (
|
||||
<HorizontalGutter className={styles.root}>
|
||||
<TabBar
|
||||
activeTab={props.activeTab}
|
||||
onTabClick={tab => props.onActiveTab({ tab })}
|
||||
>
|
||||
<TabBar activeTab={props.activeTab} onTabClick={props.onTabClick}>
|
||||
<Tab tabId="COMMENTS">Comments</Tab>
|
||||
<Tab tabId="PROFILE">My Profile</Tab>
|
||||
</TabBar>
|
||||
|
||||
Reference in New Issue
Block a user