fix(shared): Test options display
This commit is contained in:
parent
b95116ad2e
commit
040331dbac
4 changed files with 14 additions and 40 deletions
|
@ -1,13 +1,16 @@
|
|||
import OptionsIcon from 'shared/components/icons/options.js'
|
||||
import { Chevron } from 'shared/components/navigation/primary.js'
|
||||
import OptionGroup from './option-group'
|
||||
import Option from './option'
|
||||
import OptionComponent from './option'
|
||||
import { Ul, Details, TopSummary, TopSumTitle } from 'shared/components/workbench/menu'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { optionsMenuStructure } from 'shared/utils.mjs'
|
||||
|
||||
const DesignOptions = props => {
|
||||
const { t } = useTranslation(['app'])
|
||||
const Option = props.Option
|
||||
? props.Option
|
||||
: OptionComponent
|
||||
const optionsMenu = optionsMenuStructure(props.design.config.options)
|
||||
|
||||
return (
|
||||
|
@ -19,7 +22,7 @@ const DesignOptions = props => {
|
|||
<Ul className="pl-5 list-inside">
|
||||
{Object.entries(optionsMenu).map(([group, options]) => typeof options === "string"
|
||||
? <Option {...props} type={options} option={group} key={group} />
|
||||
: <OptionGroup {...props} group={group} options={options} key={group} />
|
||||
: <OptionGroup {...props} group={group} options={options} key={group} Option={Option} />
|
||||
)}
|
||||
</Ul>
|
||||
</Details>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue