Skip to content

Commit

Permalink
feat: increase max options for card
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaponov committed Apr 23, 2024
1 parent 0decdf1 commit ba6b41c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/lib/kit/hooks/useOneOf/useOneOf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
&__card {
display: flex;

& > :first-child {
& > * {
margin-right: 8px;
}

& > :last-child {
margin-right: 0;
}
}

&__checkbox {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/kit/hooks/useOneOf/useOneOf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const useOneOf = ({props, onTogglerChange}: UseOneOfParams) => {
);

const togglerType = React.useMemo(() => {
if (spec.viewSpec.oneOfParams?.toggler === 'card' && options.length < 3) {
if (spec.viewSpec.oneOfParams?.toggler === 'card' && options.length < 4) {
return 'card';
}

Expand Down

0 comments on commit ba6b41c

Please sign in to comment.