mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
refactor(editor): edgeless connector toolbar config extension (#10798)
This commit is contained in:
@@ -17,17 +17,17 @@ export type LineDetailType =
|
||||
|
||||
const LINE_STYLE_LIST = [
|
||||
{
|
||||
name: 'Solid',
|
||||
key: 'Solid',
|
||||
value: StrokeStyle.Solid,
|
||||
icon: StraightLineIcon(),
|
||||
},
|
||||
{
|
||||
name: 'Dash',
|
||||
key: 'Dash',
|
||||
value: StrokeStyle.Dash,
|
||||
icon: DashLineIcon(),
|
||||
},
|
||||
{
|
||||
name: 'None',
|
||||
key: 'None',
|
||||
value: StrokeStyle.None,
|
||||
icon: BanIcon(),
|
||||
},
|
||||
@@ -63,7 +63,7 @@ export class EdgelessLineStylesPanel extends LitElement {
|
||||
${repeat(
|
||||
LINE_STYLE_LIST.filter(item => lineStyles.includes(item.value)),
|
||||
item => item.value,
|
||||
({ name, icon, value }) => {
|
||||
({ key, icon, value }) => {
|
||||
const active = lineStyle === value;
|
||||
const classInfo = {
|
||||
'line-style-button': true,
|
||||
@@ -74,7 +74,7 @@ export class EdgelessLineStylesPanel extends LitElement {
|
||||
return html`
|
||||
<editor-icon-button
|
||||
class=${classMap(classInfo)}
|
||||
.tooltip="${name}"
|
||||
.tooltip="${key}"
|
||||
.withHover=${active}
|
||||
@click=${() => this.select({ type: 'style', value })}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user