From 40820988dad054b4a81689b3c17929f66256a56b Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 26 Jul 2025 10:51:55 -0600 Subject: [PATCH] Add my typical options helper for ease of use --- module/handlebarsHelpers/_index.mjs | 2 ++ module/handlebarsHelpers/options.mjs | 34 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 module/handlebarsHelpers/options.mjs diff --git a/module/handlebarsHelpers/_index.mjs b/module/handlebarsHelpers/_index.mjs index d0923e8..b613f61 100644 --- a/module/handlebarsHelpers/_index.mjs +++ b/module/handlebarsHelpers/_index.mjs @@ -1,5 +1,7 @@ import { filePath } from "../consts.mjs"; +import { options } from "./options.mjs"; export default { systemFilePath: filePath, + "taf-options": options, }; diff --git a/module/handlebarsHelpers/options.mjs b/module/handlebarsHelpers/options.mjs new file mode 100644 index 0000000..664aaa6 --- /dev/null +++ b/module/handlebarsHelpers/options.mjs @@ -0,0 +1,34 @@ +/** + * @typedef {object} Option + * @property {string} [label] + * @property {string|number} value + * @property {boolean} [disabled] + */ + +/** + * @param {string | number} selected The selected value + * @param {Array`, + ); + }; + return new Handlebars.SafeString(htmlOptions.join(`\n`)); +};