Skip to content

Commit

Permalink
* picker: optimize style for picker without search box.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed May 21, 2024
1 parent 53932fb commit 95570d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/picker/src/component/picker-multi-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class PickerMultiSelect extends PickTrigger<PickerState, PickerSelectProp
protected _getClass(props: PickerSelectProps) {
return classes(
super._getClass(props),
props.search ? '' : 'picker-no-search',
'picker-select picker-select-multi form-control',
);
}
Expand Down
1 change: 1 addition & 0 deletions lib/picker/src/component/picker-single-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class PickerSingleSelect extends PickTrigger<PickerState, PickerSelectPro
protected _getClass(props: PickerSelectProps) {
return classes(
super._getClass(props),
props.search ? '' : 'picker-no-search',
'picker-select picker-select-single form-control',
);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/picker/src/style/picker-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@
.picker-multi-selection > .text {
@apply -max-w-[180px] -whitespace-nowrap -overflow-clip -min-w-0;
}

.picker-no-search {
@apply -cursor-default;
}

0 comments on commit 95570d9

Please sign in to comment.