mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
@@ -16,10 +16,14 @@ import type { BlockModel } from '@blocksuite/store';
|
||||
import type { TemplateResult } from 'lit';
|
||||
|
||||
export const getIcon = (
|
||||
model: BlockModel & { type?: string }
|
||||
model: BlockModel & {
|
||||
props: {
|
||||
type?: string;
|
||||
};
|
||||
}
|
||||
): TemplateResult => {
|
||||
if (model.flavour === 'affine:paragraph') {
|
||||
const type = model.type as ParagraphType;
|
||||
const type = model.props.type as ParagraphType;
|
||||
return (
|
||||
{
|
||||
text: TextIcon(),
|
||||
@@ -39,7 +43,7 @@ export const getIcon = (
|
||||
bulleted: BulletedListIcon(),
|
||||
numbered: NumberedListIcon(),
|
||||
todo: CheckBoxCheckLinearIcon(),
|
||||
}[model.type ?? 'bulleted'] ?? BulletedListIcon()
|
||||
}[model.props.type ?? 'bulleted'] ?? BulletedListIcon()
|
||||
);
|
||||
}
|
||||
return TextIcon();
|
||||
|
||||
@@ -7,7 +7,8 @@ import type {
|
||||
TableSingleView,
|
||||
} from '@blocksuite/data-view/view-presets';
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { css, html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
|
||||
export class BlockRenderer
|
||||
@@ -22,7 +23,7 @@ export class BlockRenderer
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
font-size: var(--affine-font-base);
|
||||
line-height: var(--affine-line-height);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ import type { DetailSlotProps, SingleView } from '@blocksuite/data-view';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import type { BaseTextAttributes } from '@blocksuite/store';
|
||||
import { computed } from '@preact/signals-core';
|
||||
import { css, html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
|
||||
import { isPureText } from '../utils/title-doc.js';
|
||||
@@ -92,7 +93,9 @@ export class NoteRenderer
|
||||
protected override render(): unknown {
|
||||
return html`
|
||||
<div
|
||||
style="height: 1px;max-width: var(--affine-editor-width);background-color: var(--affine-border-color);margin: auto;margin-bottom: 16px"
|
||||
style="height: 1px;max-width: var(--affine-editor-width);background-color: ${unsafeCSS(
|
||||
cssVarV2.layer.insideBorder.border
|
||||
)};margin: auto;margin-bottom: 16px"
|
||||
></div>
|
||||
${this.renderNote()}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user