Moved src/components/Item* to readingList/components (#7876)

This commit is contained in:
Nick Taylor 2020-05-15 11:00:06 -04:00 committed by GitHub
parent e104c8b5c5
commit b376d109ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 8 additions and 8 deletions

View file

@ -9,7 +9,7 @@ import { h } from 'preact';
import { PropTypes } from 'preact-compat';
export const ItemListItemArchiveButton = ({ text, onClick }) => {
const onKeyUp = e => {
const onKeyUp = (e) => {
if (e.key === 'Enter') {
onClick(e);
}

View file

@ -3,12 +3,12 @@ import { h } from 'preact';
import { PropTypes } from 'preact-compat';
export const ItemListTags = ({ availableTags, selectedTags, onClick }) => {
const tagsHTML = availableTags.map(tag => (
const tagsHTML = availableTags.map((tag) => (
<a
className={`tag ${selectedTags.indexOf(tag) > -1 ? 'selected' : ''}`}
href={`/t/${tag}`}
data-no-instant
onClick={e => onClick(e, tag)}
onClick={(e) => onClick(e, tag)}
>
{`#${tag}`}
</a>

View file

@ -2,7 +2,7 @@ import { h } from 'preact';
import render from 'preact-render-to-json';
import { shallow } from 'preact-render-spy';
import { ItemListItem } from '../ItemListItem';
import '../../../../../assets/javascripts/lib/xss';
import '../../../../assets/javascripts/lib/xss';
const item = {
reactable: {

View file

@ -11,10 +11,10 @@ import {
toggleTag,
clearSelectedTags,
} from '../searchableItemList/searchableItemList';
import { ItemListItem } from '../src/components/ItemList/ItemListItem';
import { ItemListItemArchiveButton } from '../src/components/ItemList/ItemListItemArchiveButton';
import { ItemListLoadMoreButton } from '../src/components/ItemList/ItemListLoadMoreButton';
import { ItemListTags } from '../src/components/ItemList/ItemListTags';
import { ItemListItem } from './components/ItemListItem';
import { ItemListItemArchiveButton } from './components/ItemListItemArchiveButton';
import { ItemListLoadMoreButton } from './components/ItemListLoadMoreButton';
import { ItemListTags } from './components/ItemListTags';
const STATUS_VIEW_VALID = 'valid,confirmed';
const STATUS_VIEW_ARCHIVED = 'archived';