Skip to content

Commit 750875b

Browse files
committed
✨ feat: Add block anchor to attribute bag
1 parent ef530cc commit 750875b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Block.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ protected function getComponentAttributeBag(): ComponentAttributeBag
509509
return (new ComponentAttributeBag)
510510
->class($this->getClasses())
511511
->style($this->getInlineStyle())
512+
->merge(['id' => $this->block->anchor ?? null])
512513
->filter(fn ($value) => filled($value) && $value !== ';');
513514
}
514515

0 commit comments

Comments
 (0)