feat(component): implement Sequential ujsx component
This commit is contained in:
1 parent
0886ba1f00
commit
3dd4e4d57a
3 files changed
+80
-2
No files matched your search
@@ -1 +1,2 @@
|
||||
export {};
|
||||
export { Sequential } from "./sequential.js";
|
||||
export type { SequentialProps } from "./sequential.js";
|
||||
@@ -1 +1,18 @@
|
||||
export {};
|
||||
import type { UElement, UNode } from "@alkdev/ujsx";
|
||||
|
||||
export interface SequentialProps {
|
||||
id?: string;
|
||||
}
|
||||
|
||||
function Sequential(props: SequentialProps & { children?: UNode[] }): UElement {
|
||||
const { id, children } = props;
|
||||
return {
|
||||
type: "sequential",
|
||||
props: id !== undefined ? { id } : {},
|
||||
children: children ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
Sequential.displayName = "Sequential";
|
||||
|
||||
export { Sequential };
|
||||
Reference in new issue
Block a user