1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

eslint fix

This commit is contained in:
muerwre 2019-08-09 12:23:07 +07:00
parent dfaac877fb
commit fa4d51360b
81 changed files with 741 additions and 972 deletions

View file

@ -1,5 +1,5 @@
import React, { AllHTMLAttributes, FC } from "react";
import * as styles from "./styles.scss";
import React, { AllHTMLAttributes, FC } from 'react';
import * as styles from './styles.scss';
type IProps = AllHTMLAttributes<HTMLDivElement> & { is_blurred: boolean };

View file

@ -1,7 +1,8 @@
import React, { FC } from 'react';
import classNames = require("classnames");
import * as styles from './styles.scss';
import classNames = require('classnames');
type IProps = React.HTMLAttributes<HTMLDivElement> & {
seamless?: boolean;
}
@ -12,12 +13,12 @@ const Card: FC<IProps> = ({
seamless,
...props
}) => (
<div
className={classNames(styles.card, className, { seamless })}
{...props}
>
{children}
</div>
<div
className={classNames(styles.card, className, { seamless })}
{...props}
>
{children}
</div>
);
export { Card };

View file

@ -1,6 +1,9 @@
import React, { FC, HTMLAttributes, ReactChild, ReactChildren } from 'react';
import React, {
FC, HTMLAttributes, ReactChild, ReactChildren
} from 'react';
import * as styles from './styles.scss';
import classNames = require("classnames");
import classNames = require('classnames');
type IProps = HTMLAttributes<HTMLDivElement> & {
children: any;
@ -13,13 +16,13 @@ const CellGrid: FC<IProps> = ({
className,
...props
}) => (
<div
className={classNames(styles.grid, className)}
style={{ gridTemplateColumns: `repeat(auto-fit, minmax(${size}px, 1fr))` }}
{...props}
>
{children}
</div>
<div
className={classNames(styles.grid, className)}
style={{ gridTemplateColumns: `repeat(auto-fit, minmax(${size}px, 1fr))` }}
{...props}
>
{children}
</div>
);
export { CellGrid };

View file

@ -1,6 +1,6 @@
import React, { FC } from "react";
import classNames from "classnames";
import * as styles from "./styles.scss";
import React, { FC } from 'react';
import classNames from 'classnames';
import * as styles from './styles.scss';
type IProps = React.HTMLAttributes<HTMLDivElement> & {
horizontal?: boolean;
@ -15,14 +15,14 @@ type IProps = React.HTMLAttributes<HTMLDivElement> & {
const Grid: FC<IProps> = ({
children,
className = "",
className = '',
horizontal = false,
vertical = false,
square = false,
size = "auto",
size = 'auto',
style = {},
columns = "auto",
rows = "auto",
columns = 'auto',
rows = 'auto',
gap = 10,
stretchy,
...props
@ -37,10 +37,10 @@ const Grid: FC<IProps> = ({
style={{
...style,
gridTemplateColumns: square
? `repeat(auto-fill, ${(columns !== "auto" && columns) || size})`
? `repeat(auto-fill, ${(columns !== 'auto' && columns) || size})`
: columns,
gridTemplateRows: square
? `repeat(auto-fill, ${(rows !== "auto" && rows) || size})`
? `repeat(auto-fill, ${(rows !== 'auto' && rows) || size})`
: rows,
gridAutoRows: rows,
gridAutoColumns: columns,

View file

@ -18,7 +18,7 @@ const Group: FC<IProps> = ({
bottom = false,
wrap = false,
seamless = false,
...props
...props
}) => (
<div
className={classNames(

View file

@ -1,8 +1,9 @@
import React, { FC } from 'react';
import * as styles from './styles.scss';
import classNames = require("classnames");
type IProps = React.HTMLAttributes<HTMLDivElement> & {
import classNames = require('classnames');
type IProps = React.HTMLAttributes<HTMLDivElement> & {
padding?: number;
vertical?: boolean;
horizontal?: boolean;
@ -17,13 +18,13 @@ const Padder: FC<IProps> = ({
horizontal,
...props
}) => (
<div
className={classNames(styles.padder, className, { vertical, horizontal })}
style={padding ? { ...style, padding } : style}
{...props}
>
{children}
</div>
<div
className={classNames(styles.padder, className, { vertical, horizontal })}
style={padding ? { ...style, padding } : style}
{...props}
>
{children}
</div>
);
export { Padder };

View file

@ -1,10 +1,11 @@
import React, { FC, HTMLAttributes } from 'react';
import * as styles from './styles.scss';
import classNames = require("classnames");
import classNames = require('classnames');
type IProps = HTMLAttributes<HTMLDivElement> & {
seamless?: boolean;
stretchy?: boolean
stretchy?: boolean;
}
const Panel: FC<IProps> = ({
@ -14,9 +15,9 @@ const Panel: FC<IProps> = ({
stretchy,
...props
}) => (
<div className={classNames(styles.panel, className, { seamless, stretchy })} {...props}>
{children}
</div>
<div className={classNames(styles.panel, className, { seamless, stretchy })} {...props}>
{children}
</div>
);
export { Panel };

View file

@ -1,7 +1,7 @@
import React, { MouseEventHandler, useEffect, useState } from 'react';
import * as styles from './styles.scss';
import { Scrollbars } from 'tt-react-custom-scrollbars';
import classNames from 'classnames';
import * as styles from './styles.scss';
interface IProps {
children: Element | React.ReactChild;
@ -33,11 +33,11 @@ export const Scroll = ({
renderTrackVertical={data => <div className={styles.track_vertical} {...data} />}
renderThumbHorizontal={data => <div className={styles.thumb_horizontal} {...data} />}
renderThumbVertical={data => <div className={styles.thumb_vertical} {...data} />}
renderView = {data => <div className={styles.view} {...data} />}
renderView={data => <div className={styles.view} {...data} />}
hideTracksWhenNotNeeded
universal
ref={setRef}
{ ...props }
{...props}
>
{children}
</Scrollbars>

View file

@ -1,10 +1,10 @@
import React, {FC, HTMLAttributes} from 'react';
import React, { FC, HTMLAttributes } from 'react';
import * as styles from './styles.scss';
type IProps = HTMLAttributes<HTMLDivElement> & {}
const TagField: FC<IProps> = ({
children,
children,
}) => (
<div className={styles.wrap}>
{children}