Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve some warning message during test #1895

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function RadioGroupImpl<Value extends string>({
direction = 'vertical',
...rest
}: RadioGroupProps<Value>, forwardedRef: React.Ref<HTMLDivElement>) {
const formFieldProps = useFormFieldProps(rest)
const { hasError, ...formFieldProps } = useFormFieldProps(rest)

return (
<RadioGroupPrimitive.Root
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
type ForwardedRef,
forwardRef,
useEffect,
useMemo,
Expand Down Expand Up @@ -63,7 +64,7 @@ function SegmentedControlItemListImpl<
style,
className,
...rest
}: SegmentedControlItemListProps<Type, Value>) {
}: SegmentedControlItemListProps<Type, Value>, forwardedRef: ForwardedRef<HTMLDivElement>) {
const [selectedItemIndex, setSelectedItemIndex] = useState<number | null>(null)

const {
Expand All @@ -83,6 +84,7 @@ function SegmentedControlItemListImpl<
return (
<SegmentedControlItemList
asChild
ref={forwardedRef}
{...rest}
>
<HStack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const Switch = forwardRef<HTMLButtonElement, SwitchProps>(function Switch
const {
disabled,
required,
hasError,
...ownProps
} = useFormFieldProps(rest)

Expand Down
3 changes: 2 additions & 1 deletion packages/bezier-react/src/features/FeatureProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, {
} from 'react'

import { createContext } from '~/src/utils/react'
import { isEmpty } from '~/src/utils/type'

import {
type Feature,
Expand Down Expand Up @@ -48,7 +49,7 @@ export function FeatureProvider({
const [featureFlag, setFeatureFlag] = useState<FeatureFlag>(initialFeatureFlag)

useLayoutEffect(function activateFeatures() {
if (!features) {
if (isEmpty(features)) {
return
}

Expand Down