diff --git a/packages/react/tests/types.test.tsx b/packages/react/tests/types.test.tsx index f3194a09..6fd8646f 100644 --- a/packages/react/tests/types.test.tsx +++ b/packages/react/tests/types.test.tsx @@ -1,5 +1,7 @@ import * as React from 'react' -import createStyled, { StitchesCss } from '../types/index.d' +import createStyled, { StitchesCss, StitchesVariants } from '../types/index.d' +import * as SeparatorPrimitive from '@radix-ui/react-separator' +import type * as Polymorphic from '@radix-ui/react-polymorphic' const factory = createStyled({ theme: { @@ -59,6 +61,63 @@ type CSS = StitchesCss export const { styled, toString, theme, css, keyframes, global, config } = factory +const RComponent: React.FC<{ hola?: 'hi' | 'hello' }> = () => { + return null +} + +const StyledSeparator = styled(SeparatorPrimitive.Root, { + border: 'none', + margin: 0, + flexShrink: 0, + backgroundColor: '$gray500', + cursor: 'default', + variants: { + size: { + '1': { + '&[data-orientation="horizontal"]': { + height: '1px', + width: '$3', + }, + '&[data-orientation="vertical"]': { + width: '1px', + height: '$3', + }, + }, + '2': { + '&[data-orientation="horizontal"]': { + height: '1px', + width: '$7', + }, + '&[data-orientation="vertical"]': { + width: '1px', + height: '$7', + }, + }, + }, + }, +}) + +type SeparatorVariants = StitchesVariants +type SeparatorOwnProps = Polymorphic.OwnProps & { css?: CSS } & SeparatorVariants +type SeparatorComponent = Polymorphic.ForwardRefComponent, SeparatorOwnProps> + +export const Separator = React.forwardRef((props, forwardedRef) => { + return +}) as SeparatorComponent + +const Test0 = ( + {}} + onClick={(e) => { + console.log(e) + }} + css={{ backdropFilter: 'inherit', background: 'ActiveCaption' }} + > + hello + +) // token: theme.colors.gray100.scale theme.colors.gray100.value @@ -151,7 +210,7 @@ export function ExtendedButtonUsingReactUtilsWithInternalInlineAs(props: React.C return