mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
one component
This commit is contained in:
parent
bcb0606900
commit
a8254e7144
20
src/Corporation/ui/HeaderTab.tsx
Normal file
20
src/Corporation/ui/HeaderTab.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
current: boolean;
|
||||||
|
text: string;
|
||||||
|
onClick: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function HeaderTab(props: IProps) {
|
||||||
|
let className = "cmpy-mgmt-header-tab";
|
||||||
|
if (props.current) {
|
||||||
|
className += " current";
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button className={className} onClick={props.onClick}>
|
||||||
|
{props.text}
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
@ -3,19 +3,7 @@
|
|||||||
// divisions, see an overview of your corporation, or create a new industry
|
// divisions, see an overview of your corporation, or create a new industry
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { BaseReactComponent } from "./BaseReactComponent";
|
import { BaseReactComponent } from "./BaseReactComponent";
|
||||||
|
import { HeaderTab } from "./HeaderTab";
|
||||||
function HeaderTab(props) {
|
|
||||||
let className = "cmpy-mgmt-header-tab";
|
|
||||||
if (props.current) {
|
|
||||||
className += " current";
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<button className={className} onClick={props.onClick}>
|
|
||||||
{props.text}
|
|
||||||
</button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export class HeaderTabs extends BaseReactComponent {
|
export class HeaderTabs extends BaseReactComponent {
|
||||||
renderTab(props) {
|
renderTab(props) {
|
||||||
|
Loading…
Reference in New Issue
Block a user