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
22 lines
572 B
import { View, ViewProps } from 'react-native';
|
|
import React from 'react';
|
|
import { centerStyle } from './styles';
|
|
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
|
|
type ICenterProps = ViewProps & VariantProps<typeof centerStyle>;
|
|
|
|
const Center = React.forwardRef<React.ComponentRef<typeof View>, ICenterProps>(
|
|
function Center({ className, ...props }, ref) {
|
|
return (
|
|
<View
|
|
className={centerStyle({ class: className })}
|
|
{...props}
|
|
ref={ref}
|
|
/>
|
|
);
|
|
}
|
|
);
|
|
|
|
Center.displayName = 'Center';
|
|
|
|
export { Center };
|