Skip to content

Commit

Permalink
fix: input as simple label instead of Label component
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Dec 8, 2023
1 parent 2c484ef commit ed91a08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions packages/fuselage/src/components/CheckBox/CheckBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { ComponentProps, Ref, FormEvent, AllHTMLAttributes } from 'react';
import React, { forwardRef, useLayoutEffect, useRef, useCallback } from 'react';

import Box from '../Box';
import { Label } from '../Label';

type CheckBoxProps = ComponentProps<typeof Box> & {
indeterminate?: boolean;
Expand Down Expand Up @@ -33,7 +32,7 @@ export const CheckBox = forwardRef(function CheckBox(
);

return (
<Box is={Label} className={className} rcx-check-box>
<Box is='label' className={className} rcx-check-box>
<Box
is='input'
type='checkbox'
Expand Down
3 changes: 1 addition & 2 deletions packages/fuselage/src/components/RadioButton/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { AllHTMLAttributes, ComponentProps, Ref } from 'react';
import React, { forwardRef } from 'react';

import Box from '../Box';
import { Label } from '../Label';

type RadioButtonProps = ComponentProps<typeof Box> &
AllHTMLAttributes<HTMLInputElement>;
Expand All @@ -12,7 +11,7 @@ export const RadioButton = forwardRef(function RadioButton(
ref: Ref<HTMLInputElement>
) {
return (
<Box is={Label} className={className} rcx-radio-button>
<Box is='label' className={className} rcx-radio-button>
<Box
is='input'
rcx-radio-button__input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { AllHTMLAttributes, ComponentProps, Ref } from 'react';
import React, { forwardRef } from 'react';

import Box from '../Box';
import { Label } from '../Label';

export const ToggleSwitch = forwardRef(function ToggleSwitch(
{
Expand All @@ -12,7 +11,7 @@ export const ToggleSwitch = forwardRef(function ToggleSwitch(
ref: Ref<HTMLInputElement>
) {
return (
<Box is={Label} className={className} rcx-toggle-switch>
<Box is='label' className={className} rcx-toggle-switch>
<Box
is='input'
ref={ref}
Expand Down

0 comments on commit ed91a08

Please sign in to comment.