Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Jul 6, 2024
1 parent a050329 commit fb0a094
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/docs/scripts/update-search-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function getMDXMeta(file: string) {


const result:ResultType[] = [];
const title = frontMatter.title ? frontMatter.title : "";
const title = frontMatter.title || "";

result.push({
content: title,
Expand Down
25 changes: 16 additions & 9 deletions packages/components/badge/stories/badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,22 @@ const defaultProps = {
content: 5,
};

const Template = (args: BadgeProps) => (
<Badge {...args}>
<Avatar
isBordered={(args.classNames?.badge as string)?.includes("bottom")}
radius={args.shape === "rectangle" ? "lg" : "full"}
src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/>
</Badge>
);
const Template = (args: BadgeProps) => {
const classNamesBadge = args.classNames?.badge;
const isBordered = Array.isArray(classNamesBadge)
? classNamesBadge?.some((c) => (c as string).includes("bottom"))
: (classNamesBadge as string)?.includes("bottom");

return (
<Badge {...args}>
<Avatar
isBordered={isBordered}
radius={args.shape === "rectangle" ? "lg" : "full"}
src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/>
</Badge>
);
};

const ShapesTemplate = (args: BadgeProps) => (
<div className="flex gap-4 items-center">
Expand Down

0 comments on commit fb0a094

Please sign in to comment.