mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
common: add actual ComponentProps file that hadn't been commited
This commit is contained in:
11
js/src/common/concerns/ComponentProps.ts
Normal file
11
js/src/common/concerns/ComponentProps.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { ComponentProps } from '../Component';
|
||||||
|
import Discussion from '../models/Discussion';
|
||||||
|
import Post from '../models/Post';
|
||||||
|
|
||||||
|
export interface DiscussionProp extends ComponentProps {
|
||||||
|
discussion: Discussion;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PostProp extends ComponentProps {
|
||||||
|
post: Post;
|
||||||
|
}
|
@@ -4,11 +4,7 @@ import PostControls from '../utils/PostControls';
|
|||||||
import listItems from '../../common/helpers/listItems';
|
import listItems from '../../common/helpers/listItems';
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
|
import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
|
||||||
import PostModel from '../../common/models/Post';
|
import { PostProp } from '../../common/concerns/ComponentProps';
|
||||||
|
|
||||||
export interface PostProps extends ComponentProps {
|
|
||||||
post: PostModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `Post` component displays a single post. The basic post template just
|
* The `Post` component displays a single post. The basic post template just
|
||||||
@@ -17,7 +13,7 @@ export interface PostProps extends ComponentProps {
|
|||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
export default class Post<T extends PostProps = PostProps> extends Component<PostProps> {
|
export default class Post<T extends PostProp = PostProp> extends Component<T> {
|
||||||
loading = false;
|
loading = false;
|
||||||
controlsOpen = false;
|
controlsOpen = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user