diff --git a/sites/shared/components/workbench/menus/design-options/index.mjs b/sites/shared/components/workbench/menus/design-options/index.mjs
index b70827b4abe..c2d11682c41 100644
--- a/sites/shared/components/workbench/menus/design-options/index.mjs
+++ b/sites/shared/components/workbench/menus/design-options/index.mjs
@@ -67,16 +67,18 @@ const values = {
// Emojis for option groups :)
const emojis = {
+ advanced: 'đ¤',
fit: 'đ',
style: 'đđŊ',
dflt: 'đšī¸',
+ groupDflt: 'đ',
}
const GroupTitle = ({ group, t, open = false }) => (
- {emojis[group] ? emojis[group] : emojis.dflt}
+ {emojis[group] ? emojis[group] : emojis.groupDflt}
{t(`design-options:${group}.t`)}
{open ? ':' : ''}
@@ -138,7 +140,7 @@ export const DesignOption = ({
,
]
- if (['pct'].includes(type))
+ if (['pct', 'count'].includes(type))
openButtons.push(
) : (
- (
)
-export const CountOptionInput = ({ name, config, current, update, t }) => {
+export const CountOptionInput = ({ name, design, config, current, update, t, override }) => {
const { count, max, min } = config
if (typeof current === 'undefined') current = count
const [value, setValue] = useState(current)
- const [editCount, setEditCount] = useState(false)
const handleChange = (evt) => {
const newCurrent = evt.target.value
@@ -43,10 +42,11 @@ export const CountOptionInput = ({ name, config, current, update, t }) => {
}
return (
-
+ <>
+
{t(`${design}:o.${name}.d`)}
- {editCount ? (
-
+ {override ? (
+
) : (
<>
{min}
@@ -64,25 +64,10 @@ export const CountOptionInput = ({ name, config, current, update, t }) => {
onChange={handleChange}
className={`
range range-sm mt-1
- ${val === count ? 'range-secondary' : 'range-accent'}
+ ${current === count ? 'range-secondary' : 'range-accent'}
`}
/>
-
-
-
-
-
-
-
+ >
)
}
diff --git a/sites/shared/components/workbench/menus/design-options/values.mjs b/sites/shared/components/workbench/menus/design-options/values.mjs
index 9821e0cb0c5..d5470f7dec1 100644
--- a/sites/shared/components/workbench/menus/design-options/values.mjs
+++ b/sites/shared/components/workbench/menus/design-options/values.mjs
@@ -35,7 +35,7 @@ export const CountOptionValue = ({ name, config, current }) =>
)
export const ListOptionValue = ({ name, config, current, t }) => {
- const translate = config.doNotTranslate ? (input) => input : (input) => t(`${option}.o.${input}`)
+ const translate = config.doNotTranslate ? (input) => input : (input) => t(`${name}.o.${input}`)
return config.dflt == current || typeof current === 'undefined' ? (
{translate(config.dflt)}