Refactor AnchoredBox for greater flexibility

Big change to how the AnchoredBox component is structured so that it can be used in more than just one spot.  Now composed of the wrapper Anchored, with two children AnchoredTrigger and AnchoredBox, each of which can have their own arbitrary children.

Next steps will involve renaming the component file to Anchored.jsx, moving most styling out of the attached stylesheet (and into brewRenderer.less), and adding props to pass in Anchor Positioning properties.
This commit is contained in:
Gazook89 committed 2024-10-12 23:12:27 -05:00
1 parent 27f471791d
commit 1741abc3fe
3 files changed
+83 -69

No files matched your search

+2 -6
View File
@@ -1,17 +1,13 @@
.anchored-trigger {
@supports (anchor-name: --view-settings){
anchor-name: --view-settings;
}
&.active {
background-color: #444444;
}
}
.anchored-box {
position:absolute;
top: 30px;
@supports (position-anchor: --view-settings){
position-anchor: --view-settings;
@supports (inset-block-start: anchor(bottom)){
inset-block-start: anchor(bottom);
}
justify-self: anchor-center;