common: add actual ComponentProps file that hadn't been commited

This commit is contained in:
David Sevilla Martin 2020-02-23 09:35:32 -05:00
parent eeae395a15
commit 241b8cc99c
No known key found for this signature in database
GPG Key ID: F764F1417E16B15F
2 changed files with 13 additions and 6 deletions

View 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;
}

View File

@ -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;