@mbao01/common 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,6 @@ import type { LabelProps, LabelTextProps } from "./types";
2
2
  declare const Label: {
3
3
  ({ className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string | undefined;
5
- Text: ({ className, ...props }: LabelTextProps) => import("react/jsx-runtime").JSX.Element;
5
+ Text: ({ className, children, ...props }: LabelTextProps) => import("react/jsx-runtime").JSX.Element;
6
6
  };
7
7
  export { Label };
@@ -2,5 +2,6 @@
2
2
  import * as LabelPrimitive from "@radix-ui/react-label";
3
3
  import { type VariantProps } from "../../../../libs";
4
4
  import { getLabelClasses } from "./constants";
5
+ import { Text } from "../../../Text";
5
6
  export type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof getLabelClasses>;
6
- export type LabelTextProps = React.HTMLAttributes<HTMLSpanElement>;
7
+ export type LabelTextProps = Omit<React.ComponentProps<typeof Text>, "as">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mbao01/common",
3
3
  "private": false,
4
- "version": "0.0.28",
4
+ "version": "0.0.29",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -142,5 +142,5 @@
142
142
  "react-dom": "^18.2.0",
143
143
  "typescript": "^5.2.2"
144
144
  },
145
- "gitHead": "74c0783184a29ff6cac39bdb20a7c1d3621fc102"
145
+ "gitHead": "1ccc8b44c98ab629a4ec708e3ee1bee6d9e13be8"
146
146
  }
@@ -1,5 +1,6 @@
1
1
  import * as LabelPrimitive from "@radix-ui/react-label";
2
2
  import type { LabelProps, LabelTextProps } from "./types";
3
+ import { Text } from "../../../Text";
3
4
  import { cn } from "../../../../utilities";
4
5
  import { getLabelClasses } from "./constants";
5
6
 
@@ -11,10 +12,10 @@ const Label = ({ className, ...props }: LabelProps) => (
11
12
  );
12
13
  Label.displayName = LabelPrimitive.Root.displayName;
13
14
 
14
- const LabelText = ({ className, ...props }: LabelTextProps) => (
15
- <span className={cn("label-text", className)} {...props}>
16
- Pick the best fantasy franchise
17
- </span>
15
+ const LabelText = ({ className, children, ...props }: LabelTextProps) => (
16
+ <Text as="span" className={cn("label-text", className)} {...props}>
17
+ {children}
18
+ </Text>
18
19
  );
19
20
 
20
21
  Label.Text = LabelText;
@@ -1,10 +1,11 @@
1
1
  import * as LabelPrimitive from "@radix-ui/react-label";
2
2
  import { type VariantProps } from "../../../../libs";
3
3
  import { getLabelClasses } from "./constants";
4
+ import { Text } from "../../../Text";
4
5
 
5
6
  export type LabelProps = React.ComponentPropsWithoutRef<
6
7
  typeof LabelPrimitive.Root
7
8
  > &
8
9
  VariantProps<typeof getLabelClasses>;
9
10
 
10
- export type LabelTextProps = React.HTMLAttributes<HTMLSpanElement>;
11
+ export type LabelTextProps = Omit<React.ComponentProps<typeof Text>, "as">;