Skip to content

Commit 7851a78

Browse files
committed
Make clickable elements have pointer as cursor
1 parent a15642f commit 7851a78

File tree

14 files changed

+32
-20
lines changed

14 files changed

+32
-20
lines changed

ui/src/components/common/search/SearchBar/SearchQueryFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const SearchQueryFilter = <FormState extends FieldValues>({
4646
/>
4747

4848
<button
49-
className="icon-search w-(--input-height) rounded-r bg-tweaked-brand text-2xl text-white"
49+
className="icon-search w-(--input-height) cursor-pointer rounded-r bg-tweaked-brand text-2xl text-white"
5050
type="submit"
5151
aria-label={t('search.search')}
5252
title={t('search.search')}

ui/src/components/forms/common/LabeledContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const LabeledContainer: FC<PropsWithChildren<LabeledContainerProps>> = ({
7070
<button
7171
type="button"
7272
className={twMerge(
73-
'group inline-flex cursor-default items-center gap-2 rounded-[5px] border-solid text-sm font-bold select-none focus-visible:outline-2 focus-visible:outline-black focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-70',
73+
'group inline-flex cursor-pointer items-center gap-2 rounded-[5px] border-solid text-sm font-bold select-none focus-visible:outline-2 focus-visible:outline-black focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-70',
7474
containerStyleSelectedStatus,
7575
containerStyleErrorStatus,
7676
containerBorderSizeStyles,

ui/src/components/navbar/NavigationDropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const NavigationDropdownMenu: FC<NavigationDropdownMenuProps> = ({
1818
return (
1919
<Menu as="div" className={dropdownMenuStyles.root(className)}>
2020
<MenuButton
21-
className="mx-4 flex h-full items-center border-b-4 border-transparent px-3 hover:border-white"
21+
className="mx-4 flex h-full cursor-pointer items-center border-b-4 border-transparent px-3 hover:border-white"
2222
data-testid={testId}
2323
>
2424
{buttonContent}

ui/src/components/stop-registry/search/components/StopSearchBar/BasicFilters/SearchCriteriaRadioButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const SearchCriteriaRadioButtons: FC<
4343
{searchByOptions.map((option) => (
4444
<label
4545
htmlFor={option.name}
46-
className="inline-flex text-nowrap"
46+
className="inline-flex cursor-pointer text-nowrap"
4747
key={option.name}
4848
>
4949
<input

ui/src/styles/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
color: #666666;
6262
}
6363

64+
input[type="checkbox"]:not(:disabled),
65+
label:has(input[type="checkbox"]:not(:disabled)) {
66+
cursor: pointer;
67+
}
68+
6469
label,
6570
legend {
6671
font-weight: 700;

ui/src/uiComponents/EditButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const EditButton: FC<EditButtonProps> = (props) => {
2929
const onClick = (props as ButtonProps)?.onClick;
3030

3131
const classNames = twMerge(
32-
'ml-5 flex h-10 w-10 items-center justify-center rounded-full border border-grey bg-white',
32+
'ml-5 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-grey bg-white',
3333
'hover:enabled:border-tweaked-brand enabled:hover:outline-tweaked-brand',
3434
className,
3535
);

ui/src/uiComponents/IconButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export const IconButtonImpl: ForwardRefRenderFunction<
4646
id={identifier}
4747
data-testid={testId}
4848
title={tooltip}
49-
className={twMerge('text-center', className)}
49+
className={twMerge(
50+
'cursor-pointer text-center disabled:cursor-default',
51+
className,
52+
)}
5053
type="button"
5154
onClick={onClick}
5255
disabled={disabled}

ui/src/uiComponents/IconToggle.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export const IconToggle: FC<IconToggleProps> = ({
3333
type="button"
3434
disabled={disabled}
3535
className={twMerge(
36-
'flex h-[26px] w-[26px] items-center justify-center rounded-sm border border-gray-300',
36+
'h-[26px] w-[26px]',
37+
'flex items-center justify-center',
38+
'cursor-pointer rounded-sm border border-gray-300 disabled:cursor-default',
3739
colorClassNames,
3840
disabledClassNames,
3941
className,

ui/src/uiComponents/SimpleButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function getCommonClassNames(
6868
shape: SimpleButtonShape,
6969
) {
7070
return twJoin(
71-
'flex items-center justify-center',
71+
'flex cursor-pointer items-center justify-center',
7272
getShapeClassNames(shape),
7373
getColorClassNames(inverted, shape),
7474
// We cannot use 'disabled:' specifier, because the underlying implementation could be

ui/src/uiComponents/SimpleDropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const SimpleDropdownMenu: FC<SimpleDropdownMenuProps> = ({
2828
<Menu as="div" className={dropdownMenuStyles.root(className)}>
2929
<MenuButton
3030
className={twMerge(
31-
'mx-auto flex items-center rounded-full',
31+
'mx-auto flex cursor-pointer items-center rounded-full disabled:cursor-default',
3232
buttonClassName,
3333
)}
3434
data-testid={testId}

0 commit comments

Comments
 (0)