Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 763 Bytes
import * as React from 'react';
import styles from './FieldVisits.module.scss';
import { IUser } from '../model/IUser';
export interface IUserTabsProps {
users?: IUser[];
userSelectionChanged: (IUser) => {};
}
export class UserTabs extends React.Component<IUserTabsProps, {}> {
public render(): React.ReactElement<IUserTabsProps> {
return (
<ul className={styles.userTabs}>
{this.props.users? this.props.users.map(user => (
<li className={user.isSelected ? styles.userTab + " " + styles.userTabSelected :
styles.userTab}
onClick={ () => { this.props.userSelectionChanged(user); }} >
{user.fullName}
</li>
)) : <li></li> }
</ul>
);
}
}
You can’t perform that action at this time.