mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
chore: remove residual FC and FunctionComponent from components
This commit is contained in:
@@ -10,13 +10,13 @@ import {
|
||||
getTextProperties,
|
||||
SelectBlock,
|
||||
} from '@toeverything/framework/virgo';
|
||||
import { FC } from 'react';
|
||||
|
||||
import { TextView } from './TextView';
|
||||
|
||||
export class QuoteBlock extends BaseView {
|
||||
type = Protocol.Block.Type.quote;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
// override ChildrenView = IndentWrapper;
|
||||
|
||||
@@ -83,7 +83,7 @@ export class QuoteBlock extends BaseView {
|
||||
export class CalloutBlock extends BaseView {
|
||||
type = Protocol.Block.Type.callout;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
// override ChildrenView = IndentWrapper;
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ import {
|
||||
Protocol,
|
||||
} from '@toeverything/datasource/db-service';
|
||||
import { TextView } from './TextView';
|
||||
import { FC } from 'react';
|
||||
|
||||
import { getRandomString } from '@toeverything/components/common';
|
||||
|
||||
export class TextBlock extends BaseView {
|
||||
type = Protocol.Block.Type.text;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||
if (!block.getProperty('text')) {
|
||||
@@ -134,7 +134,7 @@ export class TextBlock extends BaseView {
|
||||
export class Heading1Block extends BaseView {
|
||||
type = Protocol.Block.Type.heading1;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||
if (!block.getProperty('text')) {
|
||||
@@ -199,7 +199,7 @@ export class Heading1Block extends BaseView {
|
||||
export class Heading2Block extends BaseView {
|
||||
type = Protocol.Block.Type.heading2;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||
if (!block.getProperty('text')) {
|
||||
@@ -264,7 +264,7 @@ export class Heading2Block extends BaseView {
|
||||
export class Heading3Block extends BaseView {
|
||||
type = Protocol.Block.Type.heading3;
|
||||
|
||||
View: FC<CreateView> = TextView;
|
||||
View: (prop: CreateView) => JSX.Element = TextView;
|
||||
|
||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||
if (!block.getProperty('text')) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FC, useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { CustomText, TextProps } from '@toeverything/components/common';
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user