@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
83 lines (81 loc) • 1.57 kB
JavaScript
import { StringEnum } from "../../utils/string-enum.js";
import { Type } from "@sinclair/typebox";
//#region src/shared/bricks/props/effects.ts
function shadow(options = {}) {
return StringEnum([
"shadow-none",
"shadow-sm",
"shadow-md",
"shadow-lg",
"shadow-xl",
"shadow-2xl"
], {
title: "Shadow",
description: "Box shadow around the brick",
enumNames: [
"None",
"Small",
"Medium",
"Large",
"XL",
"2XL"
],
"ui:placeholder": "Not specified",
"ui:field": "enum",
"ui:display": "select",
"ui:responsive": "desktop",
"ui:styleId": "styles:shadow",
...options
});
}
/**
* This function is used in ajv and type ref translations, but should not be used directly in bricks
*/
function textShadow(options = {}) {
return StringEnum([
"text-shadow-none",
"text-shadow-sm",
"text-shadow-md",
"text-shadow-lg",
"text-shadow-xl"
], {
title: "Text shadow",
enumNames: [
"None",
"S",
"M",
"L",
"XL"
],
"ui:display": "button-group",
"ui:placeholder": "Not specified",
"ui:field": "enum",
"ui:styleId": "styles:textShadow",
examples: [
"text-shadow-sm",
"text-shadow-md",
"text-shadow-lg"
],
...options
});
}
function opacity({ defaultValue = 1, title = "Opacity" } = {}) {
return Type.Number({
title,
minimum: .1,
maximum: 1,
default: defaultValue,
multipleOf: .1,
"ui:field": "slider",
"ui:unit": "%",
"ui:multiplier": 100,
examples: [
.5,
.75,
1
]
});
}
//#endregion
export { opacity, shadow, textShadow };
//# sourceMappingURL=effects.js.map