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

22 lines
572 B

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