Skip to content

Commit d5a46ce

Browse files
authored
Merge pull request #596 from acelaya-forks/boolean-control-fix
Boolean control fix
2 parents a0fbfd1 + 0db65b6 commit d5a46ce

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
66

7+
## [1.3.1] - 2025-11-14
8+
### Added
9+
* *Nothing*
10+
11+
### Changed
12+
* *Nothing*
13+
14+
### Deprecated
15+
* *Nothing*
16+
17+
### Removed
18+
* *Nothing*
19+
20+
### Fixed
21+
* [#595](https://github.com/shlinkio/shlink-frontend-kit/issues/595) Fix size of `Checkbox` and `ToggleSwitch` shrinking when not enough space is available.
22+
23+
724
## [1.3.0] - 2025-11-10
825
### Added
926
* Add new `useTagsSearch` hook for tags searching.

src/form/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type CheckboxProps = BooleanControlProps;
88
export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(({ className, ...rest }, ref) => (
99
<BooleanControl
1010
ref={ref}
11-
className={clsx('rounded-sm w-4 h-4 checked:bg-(image:--tick) bg-center', className)}
11+
className={clsx('rounded-sm min-w-4 w-4 h-4 checked:bg-(image:--tick) bg-center', className)}
1212
{...rest}
1313
/>
1414
));

src/form/ToggleSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const ToggleSwitch = forwardRef<HTMLInputElement, ToggleSwitchProps>(({ c
99
<BooleanControl
1010
ref={ref}
1111
className={clsx(
12-
'rounded-full w-8 h-4',
12+
'rounded-full min-w-8 w-8 h-4',
1313
'bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)',
1414
'focus-visible:not-checked:bg-(image:--circle-blue-light)',
1515
'checked:bg-right transition-[background-position]',

src/hooks/use-tags-search.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export type TagsSearchResult = {
2222
* A Map with the list of tags that match the search result, with the tag used both as key and value.
2323
* Returned as a Map for convenience to use with SearchCombobox.
2424
*
25-
* When no tags match the search term, or the search term is empty, then `undefined` is returned.
25+
* When the search term is empty, `undefined` is returned, so that it is possible to differentiate a search producing
26+
* no results from not currently performing a search at all.
2627
*
2728
* @see {SearchCombobox}
2829
*/

0 commit comments

Comments
 (0)