廓形仪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.

20 lines
501 B

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