@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
87 lines (85 loc) • 1.64 kB
JavaScript
import { StringEnum } from "../../utils/string-enum.js";
import { borderColor } from "./color.js";
import { Type } from "@sinclair/typebox";
//#region src/shared/bricks/props/border.ts
function border(opts = {}) {
return Type.Object({
width: StringEnum([
"border-0",
"border",
"border-2",
"border-4",
"border-8"
], {
title: "Width",
enumNames: [
"None",
"Small",
"Medium",
"Large",
"Extra large"
],
"ai:instructions": "Don't specify width if you want no border.",
"ui:field": "enum",
"ui:display": "select",
"ui:placeholder": "None",
default: "border-0"
}),
color: borderColor({
title: "Color",
description: "The color of the border.",
default: "border-current"
})
}, {
title: "Border",
"ui:styleId": "styles:border",
description: "Set the border width and color.",
"ui:field": "border",
"ui:responsive": true,
examples: [
{
width: "border-2",
color: "border-primary-200"
},
{
width: "border-4",
color: "border-accent-400"
},
{
width: "border",
color: "border-neutral-100"
}
],
...opts
});
}
function rounding(opts = {}) {
return Type.Optional(StringEnum([
"rounded-auto",
"rounded-none",
"rounded-sm",
"rounded-md",
"rounded-lg",
"rounded-xl",
"rounded-2xl",
"rounded-full"
], {
title: "Corner rounding",
enumNames: [
"Auto",
"None",
"Small",
"Medium",
"Large",
"Extra large",
"2xl",
"Full"
],
"ui:styleId": "styles:rounding",
"ui:responsive": "desktop",
...opts
}));
}
//#endregion
export { border, rounding };
//# sourceMappingURL=border.js.map