-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improvements for rendering of Array and Function blocks
This also fixes a few other small rendering issues. Signed-off-by: Nick Mitchell <[email protected]>
- Loading branch information
Showing
9 changed files
with
38 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
import type Model from "../timeline/model" | ||
|
||
export default function BlockNotFound({ | ||
id, | ||
model, | ||
}: { | ||
id: string | ||
model: Model | ||
}) { | ||
return ( | ||
<> | ||
<div> | ||
Block not found{" "} | ||
<strong> | ||
<pre>{id}</pre> | ||
</strong> | ||
</div> | ||
<div className="pdl-wrap"> | ||
<code>{model.map((_) => _.id).join(", ")}</code> | ||
</div> | ||
</> | ||
) | ||
export default function BlockNotFound(_props: { id: string; model: Model }) { | ||
return <div>Block not found</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { stringify } from "yaml" | ||
|
||
import Group from "../Group" | ||
import CodeGroup from "../../transcript/CodeGroup" | ||
|
||
export default function FunctionItems({ | ||
block: { def, function: func, return: retrn }, | ||
}: { | ||
block: import("../../../pdl_ast").FunctionBlock | ||
}) { | ||
return ( | ||
<> | ||
{def && <Group description={def} term="Name" />} | ||
<CodeGroup code={stringify(func)} term="Parameters" /> | ||
<CodeGroup code={stringify(retrn)} term="Body" /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.pdl-qav { | ||
display: flex; | ||
align-items: center; | ||
align-items: baseline; | ||
} | ||
|
||
.pdl-qav-label { | ||
|