1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

#23 added superpowers ui tab

This commit is contained in:
Fedor Katurov 2021-03-19 17:00:26 +07:00
parent c939dcbce8
commit b1f019ebae
15 changed files with 162 additions and 42 deletions

View file

@ -21,7 +21,7 @@ const BorisComments: FC<IProps> = ({ isLoadingComments, node, commentCount, comm
const user = useShallowSelect(selectAuthUser);
return (
<Card className={styles.content}>
<>
<Group className={styles.grid}>
{user.is_user && <NodeCommentForm isBefore nodeId={node.id} />}
@ -33,7 +33,7 @@ const BorisComments: FC<IProps> = ({ isLoadingComments, node, commentCount, comm
</Group>
<Footer />
</Card>
</>
);
};

View file

@ -4,7 +4,7 @@
flex: 4;
z-index: 2;
border-radius: $radius;
padding: 0;
padding: $gap;
background: $node_bg;
box-shadow: inset transparentize(mix($wisegreen, white, 60%), 0.6) 0 1px;

View file

@ -1,9 +1,12 @@
@import "~/styles/variables.scss";
.card {
flex: 3;
align-self: stretch;
position: relative;
z-index: 1;
padding: 20px 30px;
background-color: lighten($content_bg, 4%);
}
.sample {

View file

@ -0,0 +1,16 @@
import React, { FC, MouseEventHandler } from 'react';
import classNames from 'classnames';
import styles from './styles.module.scss';
interface IProps {
active?: boolean;
onClick?: MouseEventHandler<any>;
}
const Tab: FC<IProps> = ({ active, onClick, children }) => (
<div className={classNames(styles.tab, { [styles.active]: active })} onClick={onClick}>
{children}
</div>
);
export { Tab };

View file

@ -0,0 +1,20 @@
@import "src/styles/variables";
.tab {
@include outer_shadow();
padding: $gap;
margin-right: $gap;
border-radius: $radius $radius 0 0;
font: $font_14_semibold;
text-transform: uppercase;
cursor: pointer;
background-color: $content_bg;
color: white;
text-decoration: none;
border: none;
&.active {
background: lighten($content_bg, 4%);
}
}

View file

@ -0,0 +1,12 @@
import React, { FC, useCallback } from 'react';
import styles from './styles.module.scss';
import classNames from 'classnames';
import { IAuthState } from '~/redux/auth/types';
interface IProps {}
const Tabs: FC<IProps> = ({ children }) => {
return <div className={styles.wrap}>{children}</div>;
};
export { Tabs };

View file

@ -0,0 +1,9 @@
@import "src/styles/variables";
.wrap {
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin: $gap * 2 0 0 0;
padding: 0 $gap;
}

View file

@ -12,7 +12,7 @@ type IProps = RouteComponentProps & {
type CellSize = 'small' | 'medium' | 'large';
const getTitleLetters = (title: string): string => {
const getTitleLetters = (title?: string): string => {
const words = (title && title.split(' ')) || [];
if (!words.length) return '';