Browse Source

feat(node): add component for model c4

pull/1000/head
Jeongseop Lim 6 months ago
parent
commit
591b161e44
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      diagrams/c4/__init__.py

+ 13
- 0
diagrams/c4/__init__.py View File

@@ -57,6 +57,19 @@ def C4Node(name, technology="", description="", type="Container", **kwargs):
return Node(**node_attributes)


def Component(name, technology="", description="", **kwargs):
container_attributes = {
"name": name,
"technology": technology,
"description": description,
"type": "Component",
"fillcolor": "lightskyblue",
"fontcolor": "black",
}
container_attributes.update(kwargs)
return C4Node(**container_attributes)


def Container(name, technology="", description="", **kwargs):
container_attributes = {
"name": name,


Loading…
Cancel
Save