Skip to content

BlockSuite API Documentation / @blocksuite/affine-model / StyleOne

Class: StyleOne

Extends

Constructors

new StyleOne()

new StyleOne(): StyleOne

Returns

StyleOne

Inherited from

MindmapStyleGetter.constructor

Properties

root

readonly root: object

color

color: string = '--affine-black'

fillColor

fillColor: string = '--affine-white'

filled

filled: boolean = true

fontFamily

fontFamily: FontFamily = FontFamily.Poppins

fontSize

fontSize: number = 20

fontWeight

fontWeight: FontWeight = FontWeight.SemiBold

padding

padding: [number, number]

radius

radius: number = 8

shadow

shadow: object

shadow.blur

shadow.blur: number = 12

shadow.color

shadow.color: string = 'rgba(0, 0, 0, 0.14)'

shadow.offsetX

shadow.offsetX: number = 0

shadow.offsetY

shadow.offsetY: number = 6

strokeColor

strokeColor: string = '#84CFFF'

strokeWidth

strokeWidth: number = 4

textResizing

textResizing: TextResizing = TextResizing.AUTO_WIDTH_AND_HEIGHT

Overrides

MindmapStyleGetter.root

Defined in

packages/affine/model/src/elements/mindmap/style.ts:90

Methods

getNodeStyle()

getNodeStyle(_, path): object

Parameters

_

MindmapNode

path

number[]

Returns

object

collapseButton

collapseButton: object

collapseButton.fillColor

collapseButton.fillColor: string = '--affine-white'

collapseButton.filled

collapseButton.filled: boolean = true

collapseButton.height

collapseButton.height: number = 16

collapseButton.radius

collapseButton.radius: number = 0.5

collapseButton.strokeColor

collapseButton.strokeColor: string = color

collapseButton.strokeWidth

collapseButton.strokeWidth: number = 3

collapseButton.width

collapseButton.width: number = 16

connector

connector: object

connector.mode

connector.mode: ConnectorMode = ConnectorMode.Curve

connector.stroke

connector.stroke: string = color

connector.strokeStyle

connector.strokeStyle: StrokeStyle = StrokeStyle.Solid

connector.strokeWidth

connector.strokeWidth: number = 3

expandButton

expandButton: object

expandButton.color

expandButton.color: string = '--affine-white'

expandButton.fillColor

expandButton.fillColor: string = color

expandButton.filled

expandButton.filled: boolean = true

expandButton.fontFamily

expandButton.fontFamily: FontFamily = FontFamily.Inter

expandButton.fontSize

expandButton.fontSize: number = 15

expandButton.fontWeight

expandButton.fontWeight: FontWeight = FontWeight.Bold

expandButton.height

expandButton.height: number = 24

expandButton.padding

expandButton.padding: number[]

expandButton.radius

expandButton.radius: number = 8

expandButton.strokeColor

expandButton.strokeColor: string = color

expandButton.strokeWidth

expandButton.strokeWidth: number = 0

expandButton.width

expandButton.width: number = 24

node

node: object

node.color

node.color: string = '--affine-black'

node.fillColor

node.fillColor: string = '--affine-white'

node.filled

node.filled: boolean = true

node.fontFamily

node.fontFamily: FontFamily = FontFamily.Poppins

node.fontSize

node.fontSize: number = 16

node.fontWeight

node.fontWeight: FontWeight = FontWeight.Medium

node.padding

node.padding: [number, number]

node.radius

node.radius: number = 8

node.shadow

node.shadow: object

node.shadow.blur

node.shadow.blur: number = 12

node.shadow.color

node.shadow.color: string = 'rgba(0, 0, 0, 0.14)'

node.shadow.offsetX

node.shadow.offsetX: number = 0

node.shadow.offsetY

node.shadow.offsetY: number = 6

node.strokeColor

node.strokeColor: string = color

node.strokeWidth

node.strokeWidth: number = 3

node.textResizing

node.textResizing: TextResizing = TextResizing.AUTO_WIDTH_AND_HEIGHT

Overrides

MindmapStyleGetter.getNodeStyle

Defined in

packages/affine/model/src/elements/mindmap/style.ts:120