Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slow-trees-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackflow/plugin-basic-ui": minor
---

Expose interfaces to modify width of edge
6 changes: 6 additions & 0 deletions extensions/plugin-basic-ui/src/basicUIPlugin.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const GLOBAL_VARS = {
borderRadius: "modal-border-radius",
maxWidth: "modal-max-width",
},
edge: {
width: 'edge-width',
}
};

export const globalVars = createGlobalThemeContract(
Expand Down Expand Up @@ -88,6 +91,9 @@ const androidValues: GlobalVars = {
borderRadius: "1rem",
maxWidth: "100%",
},
edge: {
width: "1.25rem",
}
};

const cupertinoValues: GlobalVars = {
Expand Down
6 changes: 3 additions & 3 deletions extensions/plugin-basic-ui/src/basicUIPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ export const basicUIPlugin: (
[css.globalVars.backgroundColor]: _options.backgroundColor,
[css.globalVars.backgroundImage]: _options.backgroundImage,
[css.globalVars.dimBackgroundColor]: _options.dimBackgroundColor,
[css.globalVars.transitionDuration]:
`${stack.transitionDuration}ms`,
[css.globalVars.transitionDuration]: `${stack.transitionDuration}ms`,
[css.globalVars.computedTransitionDuration]:
stack.globalTransitionState === "loading"
? `${stack.transitionDuration}ms`
Expand All @@ -91,7 +90,8 @@ export const basicUIPlugin: (
[css.globalVars.appBar.lineHeight]: _options.appBar?.lineHeight,
[css.globalVars.appBar.hitSlop]: _options.appBar?.hitSlop,
[css.globalVars.appBar.itemGap]: _options.appBar?.itemGap,
}),
[css.globalVars.edge.width]: _options.edge?.width,
})
)}
>
{stack.render()}
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-basic-ui/src/components/AppScreen.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const edge = recipe({
f.left0,
f.fullHeight,
{
width: "1.25rem",
width: globalVars.edge.width,
zIndex: vars.zIndexes.edge,
},
],
Expand Down
5 changes: 5 additions & 0 deletions extensions/plugin-basic-ui/src/components/AppScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ const AppScreen: React.FC<AppScreenProps> = ({
<div
ref={edgeRef}
className={css.edge({ hasAppBar })}
style={assignInlineVars(
compactMap({
[globalVars.edge.width]: globalOptions.edge?.width,
}),
)}
data-part="edge"
{...activityDataAttributes}
/>
Expand Down
Loading