fix border style

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-09-02 17:13:05 +02:00
parent edf72ab183
commit 6d858380c7
5 changed files with 57 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
// src/components/Box.tsx
import { spread as _$spread } from "@opentui/solid";
import { mergeProps as _$mergeProps } from "@opentui/solid";
import { memo as _$memo } from "@opentui/solid";
import { createElement as _$createElement } from "@opentui/solid";
function Box(props) {
return (() => {
var _el$ = _$createElement("box");
_$spread(_el$, _$mergeProps(props, {
get borderStyle() {
return props.borderStyle ?? theme.borderStyle;
}
}), false);
return _el$;
})();
}
export { Box };
+11
View File
@@ -0,0 +1,11 @@
// @bun
import {
Box
} from "../chunk-n96bgmbh.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
export {
Box
};
+10 -6
View File
@@ -1,11 +1,7 @@
// @bun
import {
Tabs,
stepTabValue
} from "../chunk-jb965p47.js";
import {
SignalBars
} from "../chunk-xab9ag99.js";
Box
} from "../chunk-n96bgmbh.js";
import {
NotificationHost
} from "../chunk-g7p0f33m.js";
@@ -18,6 +14,10 @@ import {
import {
Sidebar
} from "../chunk-vve1k0ax.js";
import {
Tabs,
stepTabValue
} from "../chunk-jb965p47.js";
import {
Modal
} from "../chunk-4j2gzwtd.js";
@@ -27,6 +27,9 @@ import {
import {
ProgressBar
} from "../chunk-ae0jkf2z.js";
import {
SignalBars
} from "../chunk-xab9ag99.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
import"../chunk-7f8jagy5.js";
@@ -42,5 +45,6 @@ export {
NotificationHost,
Modal,
MinSizeGuard,
Box,
Badge
};
+12
View File
@@ -0,0 +1,12 @@
import type { BoxProps as OpenTUIBoxProps } from "@opentui/solid";
import { theme } from "../index.ts";
export interface BoxProps extends OpenTUIBoxProps {}
// The raw <box> intrinsic has no idea ilovetui's theme exists — its own
// borderStyle default ("single") is hardcoded in @opentui/core. Use <Box>
// instead of <box> wherever you want theme.borderStyle applied by default,
// same as Sidebar/Modal/Tabs already do internally.
export function Box(props: BoxProps) {
return <box {...props} borderStyle={props.borderStyle ?? theme.borderStyle} />;
}
+1
View File
@@ -1,4 +1,5 @@
export { Badge, type BadgeProps } from "./Badge.tsx";
export { Box, type BoxProps } from "./Box.tsx";
export { MinSizeGuard, type MinSizeGuardProps } from "./MinSizeGuard.tsx";
export { Modal, type ModalProps } from "./Modal.tsx";
export { NotificationHost, type NotificationHostProps } from "./NotificationHost.tsx";