Moved src/components/Item* to readingList/components (#7876)
This commit is contained in:
parent
e104c8b5c5
commit
b376d109ef
13 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -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: {
|
||||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue