mirror of
https://github.com/khairul169/vaulterm.git
synced 2025-04-28 16:49:39 +07:00
19 lines
433 B
TypeScript
19 lines
433 B
TypeScript
import React from "react";
|
|
import { GetProps, Text, View } from "tamagui";
|
|
|
|
type BadgeProps = GetProps<typeof View>;
|
|
|
|
const Badge = ({ children, ...props }: BadgeProps) => {
|
|
return (
|
|
<View px={5} py={1} flexShrink={0} bg="$blue6" borderRadius="$3" {...props}>
|
|
{typeof children === "string" ? (
|
|
<Text fontSize="$2">{children}</Text>
|
|
) : (
|
|
children
|
|
)}
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default Badge;
|