Skip to content

Commit 63ce565

Browse files
authored
feat: increase max options for CardOneOf (#197)
1 parent 0decdf1 commit 63ce565

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/lib/kit/hooks/useOneOf/useOneOf.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@
2222
&__card {
2323
display: flex;
2424

25-
& > :first-child {
25+
& > * {
2626
margin-right: 8px;
2727
}
28+
29+
& > :last-child {
30+
margin-right: 0;
31+
}
2832
}
2933

3034
&__checkbox {

src/lib/kit/hooks/useOneOf/useOneOf.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const useOneOf = ({props, onTogglerChange}: UseOneOfParams) => {
100100
);
101101

102102
const togglerType = React.useMemo(() => {
103-
if (spec.viewSpec.oneOfParams?.toggler === 'card' && options.length < 3) {
103+
if (spec.viewSpec.oneOfParams?.toggler === 'card' && options.length < 4) {
104104
return 'card';
105105
}
106106

0 commit comments

Comments
 (0)