Skip to content

Commit

Permalink
chore: required badge in next to the name
Browse files Browse the repository at this point in the history
  • Loading branch information
deder-mw committed Nov 11, 2024
1 parent 5ff17ef commit 7064e89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.nameCell {
display: flex;
gap: var(--size-px--s);
flex-wrap: wrap;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { customComponents } from "@/lib/mdx/components/MdxFileView/customCompone
import Markdown from "react-markdown";
import { omit } from "remeda";
import { Badge } from "@mittwald/flow-react-components/Badge";
import styles from "./PropertyRow.module.css";

export interface PropertyTableGroupProps {
property: Property;
Expand All @@ -19,9 +20,10 @@ export const PropertyRow: React.FC<PropertyTableGroupProps> = ({
.replaceAll(/{@link (\S+)}/g, "[$1]($1)");
return (
<TableRow>
<TableCell>
<TableCell className={styles.nameCell}>
<InlineCode>{property.name}</InlineCode>
{property.required && <Badge>Required</Badge>}
<Badge>Required</Badge>
</TableCell>
<TableCell>{property.type}</TableCell>
<TableCell>{property.default || "-"}</TableCell>
Expand Down

0 comments on commit 7064e89

Please sign in to comment.