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

cleanup and partial ITag

This commit is contained in:
Fedor Katurov 2019-10-09 17:05:22 +07:00
parent 17f58daa67
commit cb2f784ed2
3 changed files with 9 additions and 15 deletions

View file

@ -4,14 +4,14 @@ import { ITag } from '~/redux/types';
import classNames = require('classnames');
const getTagFeature = (tag: ITag) => {
const getTagFeature = (tag: Partial<ITag>) => {
if (tag.title.substr(0, 1) === '/') return 'green';
return '';
};
interface IProps {
tag: ITag;
tag: Partial<ITag>;
is_hoverable?: boolean;
onInput?: ChangeEventHandler<HTMLInputElement>;

View file

@ -9,16 +9,12 @@ import React, {
useRef,
} from 'react';
import { TagField } from '~/components/containers/TagField';
import { ITag, INode } from '~/redux/types';
import { ITag } from '~/redux/types';
import { Tag } from '~/components/node/Tag';
import uniq from 'ramda/es/uniq';
import { setTimeout } from 'timers';
import length from 'ramda/es/length';
import isEmpty from 'ramda/es/isEmpty';
import symmetricDifference from 'ramda/es/symmetricDifference';
type IProps = HTMLAttributes<HTMLDivElement> & {
tags: ITag[];
tags: Partial<ITag>[];
is_editable?: boolean;
onTagsChange?: (tags: string[]) => void;
};