Skip to content

Commit

Permalink
選択領域にcursor: pointer;をつける
Browse files Browse the repository at this point in the history
  • Loading branch information
miyabin4113 committed Nov 11, 2023
1 parent 356d697 commit 2c838c7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
27 changes: 16 additions & 11 deletions src/components/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import styles from '@/styles/components/input.module.scss';

interface Props {
type: JSX.IntrinsicElements['input']['type'];
value: JSX.IntrinsicElements['input']['value'];
Expand All @@ -18,16 +20,19 @@ export const Input = ({
id,
}: Props) => {
return (
<label className={className}>
<input
type={type}
id={id}
value={value}
name={name ?? value?.toString()}
onClick={onClick}
defaultChecked={checked}
/>
{value}
</label>
<div className={className}>
<label className={styles.pointer}>
<input
type={type}
id={id}
value={value}
name={name ?? value?.toString()}
onClick={onClick}
defaultChecked={checked}
className={styles.pointer}
/>
{value}
</label>
</div>
);
};
2 changes: 1 addition & 1 deletion src/components/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Selector = ({
id={item.prefCode.toString()}
value={item.prefName}
onClick={changePrefectures}
className={styles.label}
className={styles.checkbox}
/>
);
})}
Expand Down
3 changes: 3 additions & 0 deletions src/styles/components/input.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pointer {
cursor: pointer;
}
2 changes: 1 addition & 1 deletion src/styles/components/selector.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
gap: 16px 10px;
}

.label {
.checkbox {
width: 86px;
}

0 comments on commit 2c838c7

Please sign in to comment.