Skip to content

Commit efa3e02

Browse files
authored
chore: export pill components (#212)
* export pills * use new props
1 parent 2c48718 commit efa3e02

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
export type { ParamHeadProps } from "./param-head";
22
export { ParamHead } from "./param-head";
3+
export type {
4+
DeprecatedPillProps,
5+
InfoPillProps,
6+
RequiredPillProps,
7+
} from "./pills";
8+
export { DeprecatedPill, InfoPill, RequiredPill } from "./pills";
39
export type { PropertyProps } from "./property";
410
export { Property } from "./property";

packages/components/src/components/property/pills.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const InfoPill = ({ children, prefix, className }: InfoPillProps) => {
2424
);
2525
};
2626

27-
const RequiredPill = ({ label }: { label?: string }) => {
27+
type RequiredPillProps = {
28+
label?: string;
29+
};
30+
31+
const RequiredPill = ({ label }: RequiredPillProps) => {
2832
if (!label) {
2933
return null;
3034
}
@@ -39,7 +43,11 @@ const RequiredPill = ({ label }: { label?: string }) => {
3943
);
4044
};
4145

42-
const DeprecatedPill = ({ label }: { label?: string }) => {
46+
type DeprecatedPillProps = {
47+
label?: string;
48+
};
49+
50+
const DeprecatedPill = ({ label }: DeprecatedPillProps) => {
4351
if (!label) {
4452
return null;
4553
}
@@ -55,3 +63,5 @@ const DeprecatedPill = ({ label }: { label?: string }) => {
5563
};
5664

5765
export { InfoPill, RequiredPill, DeprecatedPill };
66+
67+
export type { InfoPillProps, RequiredPillProps, DeprecatedPillProps };

0 commit comments

Comments
 (0)