Text and image blocks
This commit is contained in:
parent
4ae88bee0b
commit
7df22fecdb
2 changed files with 1 additions and 15 deletions
|
@ -3,17 +3,10 @@
|
|||
import { IOrderedBlock, MutableOrderedBlock } from './orderedBlock'
|
||||
|
||||
interface ImageBlock extends IOrderedBlock {
|
||||
|
||||
readonly url: string
|
||||
}
|
||||
|
||||
class MutableImageBlock extends MutableOrderedBlock implements IOrderedBlock {
|
||||
get order(): number {
|
||||
return this.fields.order as number
|
||||
}
|
||||
set order(value: number) {
|
||||
this.fields.order = value
|
||||
}
|
||||
|
||||
get url(): string {
|
||||
return this.fields.url as string
|
||||
}
|
||||
|
|
|
@ -7,13 +7,6 @@ interface TextBlock extends IOrderedBlock {
|
|||
}
|
||||
|
||||
class MutableTextBlock extends MutableOrderedBlock {
|
||||
get order(): number {
|
||||
return this.fields.order as number
|
||||
}
|
||||
set order(value: number) {
|
||||
this.fields.order = value
|
||||
}
|
||||
|
||||
constructor(block: any = {}) {
|
||||
super(block)
|
||||
this.type = 'text'
|
||||
|
|
Loading…
Reference in a new issue