廓形仪rn版本-技术调研
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
495 B

  1. import React from 'react';
  2. import { boxStyle } from './styles';
  3. import type { VariantProps } from '@gluestack-ui/nativewind-utils';
  4. type IBoxProps = React.ComponentPropsWithoutRef<'div'> &
  5. VariantProps<typeof boxStyle> & { className?: string };
  6. const Box = React.forwardRef<HTMLDivElement, IBoxProps>(function Box(
  7. { className, ...props },
  8. ref
  9. ) {
  10. return (
  11. <div ref={ref} className={boxStyle({ class: className })} {...props} />
  12. );
  13. });
  14. Box.displayName = 'Box';
  15. export { Box };