@roots/bud
Version:
Configurable, extensible build tools for modern single and multi-page web applications
21 lines (20 loc) • 921 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "@roots/bud-support/jsx-runtime";
import { LabelBox } from '@roots/bud/cli/components/LabelBox';
import { Box, Text } from '@roots/bud-support/ink';
export const Paths = ({ path }) => {
if (!path)
return null;
const paths = [
[`project`, path()],
[`input`, path(`@src`)],
[`output`, path(`@dist`)],
[`storage`, path(`@storage`)],
].map(([label, dir]) => [
label,
dir !== path() ? dir.replace(path(), `@project`) : dir,
]);
return (_jsx(LabelBox, { label: "Project paths", children: _jsx(Box, { flexDirection: "column", children: paths.map(([label, path], i) => (_jsx(Item, { label: label, path: path }, i))) }) }));
};
const Item = ({ label, path }) => {
return (_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsxs(Text, { children: [label, ":"] }), _jsx(Text, { children: path })] }));
};