mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 23:07:41 +08:00
common: add actual ComponentProps file that hadn't been commited
This commit is contained in:
parent
eeae395a15
commit
241b8cc99c
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 ItemList from '../../common/utils/ItemList';
|
||||
import SubtreeRetainer from '../../common/utils/SubtreeRetainer';
|
||||
import PostModel from '../../common/models/Post';
|
||||
|
||||
export interface PostProps extends ComponentProps {
|
||||
post: PostModel;
|
||||
}
|
||||
import { PostProp } from '../../common/concerns/ComponentProps';
|
||||
|
||||
/**
|
||||
* The `Post` component displays a single post. The basic post template just
|
||||
@ -17,7 +13,7 @@ export interface PostProps extends ComponentProps {
|
||||
*
|
||||
* @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;
|
||||
controlsOpen = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user