...

Source file src/oss.terrastruct.com/d2/d2themes/common.go

Documentation: oss.terrastruct.com/d2/d2themes

     1  package d2themes
     2  
     3  import (
     4  	"oss.terrastruct.com/d2/d2target"
     5  )
     6  
     7  func ShapeTheme(shape d2target.Shape) (fill, stroke string) {
     8  	if shape.Type == d2target.ShapeSQLTable || shape.Type == d2target.ShapeClass {
     9  		// Fill is used for header fill in these types
    10  		// This fill property is just background of rows
    11  		fill = shape.Stroke
    12  		// Stroke (border) of these shapes should match the header fill
    13  		stroke = shape.Fill
    14  	} else {
    15  		fill = shape.Fill
    16  		stroke = shape.Stroke
    17  	}
    18  	return fill, stroke
    19  }
    20  

View as plain text