mirror of
https://github.com/khairul169/home-lab.git
synced 2026-10-02 17:13:57 +07:00
feat: project init
This commit is contained in:
@@ -4,8 +4,10 @@ import { View } from "react-native";
|
||||
|
||||
type Props = ComponentPropsWithClassName<typeof View>;
|
||||
|
||||
const Box = ({ className, ...props }: Props) => {
|
||||
return <View style={cn(className)} {...props} />;
|
||||
const Box = ({ className, style, ...props }: Props) => {
|
||||
return (
|
||||
<View style={{ ...cn(className), ...((style || {}) as any) }} {...props} />
|
||||
);
|
||||
};
|
||||
|
||||
export default Box;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { View, Text } from "react-native";
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Divider = ({ className }: { className?: string }) => {
|
||||
return <View style={cn("border-b border-gray-300 w-full h-1", className)} />;
|
||||
};
|
||||
|
||||
export default Divider;
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Text as BaseText } from "react-native";
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ComponentPropsWithClassName } from "@/types/components";
|
||||
|
||||
const Text = ({
|
||||
className,
|
||||
...props
|
||||
}: ComponentPropsWithClassName<typeof BaseText>) => {
|
||||
return <BaseText style={cn(className)} {...props} />;
|
||||
};
|
||||
|
||||
export default Text;
|
||||
Reference in New Issue
Block a user