Skip to content

Commit 4e4c0d9

Browse files
authored
feat(plugin-basic-ui): Expose edge width customization interface (#652)
1 parent c23c5e6 commit 4e4c0d9

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.changeset/slow-trees-hunt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@stackflow/plugin-basic-ui": minor
3+
---
4+
5+
Expose interfaces to modify width of edge

extensions/plugin-basic-ui/src/basicUIPlugin.css.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const GLOBAL_VARS = {
4343
borderRadius: "modal-border-radius",
4444
maxWidth: "modal-max-width",
4545
},
46+
edge: {
47+
width: 'edge-width',
48+
}
4649
};
4750

4851
export const globalVars = createGlobalThemeContract(
@@ -88,6 +91,9 @@ const androidValues: GlobalVars = {
8891
borderRadius: "1rem",
8992
maxWidth: "100%",
9093
},
94+
edge: {
95+
width: "1.25rem",
96+
}
9197
};
9298

9399
const cupertinoValues: GlobalVars = {

extensions/plugin-basic-ui/src/basicUIPlugin.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ export const basicUIPlugin: (
6969
[css.globalVars.backgroundColor]: _options.backgroundColor,
7070
[css.globalVars.backgroundImage]: _options.backgroundImage,
7171
[css.globalVars.dimBackgroundColor]: _options.dimBackgroundColor,
72-
[css.globalVars.transitionDuration]:
73-
`${stack.transitionDuration}ms`,
72+
[css.globalVars.transitionDuration]: `${stack.transitionDuration}ms`,
7473
[css.globalVars.computedTransitionDuration]:
7574
stack.globalTransitionState === "loading"
7675
? `${stack.transitionDuration}ms`
@@ -91,7 +90,8 @@ export const basicUIPlugin: (
9190
[css.globalVars.appBar.lineHeight]: _options.appBar?.lineHeight,
9291
[css.globalVars.appBar.hitSlop]: _options.appBar?.hitSlop,
9392
[css.globalVars.appBar.itemGap]: _options.appBar?.itemGap,
94-
}),
93+
[css.globalVars.edge.width]: _options.edge?.width,
94+
})
9595
)}
9696
>
9797
{stack.render()}

extensions/plugin-basic-ui/src/components/AppScreen.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export const edge = recipe({
195195
f.left0,
196196
f.fullHeight,
197197
{
198-
width: "1.25rem",
198+
width: globalVars.edge.width,
199199
zIndex: vars.zIndexes.edge,
200200
},
201201
],

0 commit comments

Comments
 (0)