This commit is contained in:
rizrmd 2024-06-20 14:55:07 -07:00
parent afed8e9d40
commit 630812a7f4
6 changed files with 25 additions and 26 deletions

View File

@ -1,5 +1,4 @@
import { GFCol } from "lib/gen/utils"; import { GFCol, parseGenField } from "lib/gen/utils";
import { parseGenField } from "../../../..";
import { getFilter } from "../utils/get-filter"; import { getFilter } from "../utils/get-filter";
import { parseSingleFilter } from "./single-filter"; import { parseSingleFilter } from "./single-filter";
import { softDeleteFilter } from "./soft-delete-filter"; import { softDeleteFilter } from "./soft-delete-filter";

View File

@ -1,4 +1,4 @@
import { getPathname } from "../../../.."; import { getPathname } from "lib/utils/pathname";
import { filter_window } from "./types"; import { filter_window } from "./types";
export const getFilter = (name: string) => { export const getFilter = (name: string) => {

View File

@ -317,7 +317,6 @@ export const genTableEdit = async (
name: "btn-submit", name: "btn-submit",
type: "item", type: "item",
edit: null as any, edit: null as any,
padding: { b: 10, l: 10, r: 10, t: 0 },
childs: [ childs: [
{ {
id: createId(), id: createId(),

View File

@ -150,6 +150,7 @@ export type FieldInternal<T extends FieldProp["type"]> = {
disabled: boolean; disabled: boolean;
required_msg: FieldProp["required_msg"]; required_msg: FieldProp["required_msg"];
col?: GFCol; col?: GFCol;
ref?: any;
Child: () => ReactNode; Child: () => ReactNode;
custom: FieldProp["custom"]; custom: FieldProp["custom"];
input: Record<string, any> & { input: Record<string, any> & {

View File

@ -1,7 +1,6 @@
import { GenFn } from "lib/gen/utils"; import { GenFn } from "lib/gen/utils";
import { generateList } from "./md-list";
import { generateForm } from "../../../..";
import { generateMDForm } from "./md-form"; import { generateMDForm } from "./md-form";
import { generateList } from "./md-list";
const w = window as unknown as { const w = window as unknown as {
generating_prasi_md: Record<string, true>; generating_prasi_md: Record<string, true>;

View File

@ -43,27 +43,28 @@ export interface ButtonProps
asChild?: boolean; asChild?: boolean;
} }
const Button = React.forwardRef<HTMLDivElement, ButtonProps>( const Button = React.forwardRef<
({ className, variant, size, asChild = false, ...props }, ref) => { HTMLDivElement | HTMLButtonElement,
const Comp = asChild ? Slot : "button"; ButtonProps
>(({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return ( return (
<div <div
className={cn( className={cn(
buttonVariants({ variant, size, className }), buttonVariants({ variant, size, className }),
`btn-${variant || "default"} btn c-transition-all c-duration-300`, `btn-${variant || "default"} btn c-transition-all c-duration-300`,
css` css`
> div { > div {
border-radius: calc(var(--radius) - 2px); border-radius: calc(var(--radius) - 2px);
} }
` `
)} )}
ref={ref} ref={ref as any}
{...props} {...props}
/> />
); );
} });
);
Button.displayName = "Button"; Button.displayName = "Button";
const FloatButton = React.forwardRef<HTMLDivElement, ButtonProps>( const FloatButton = React.forwardRef<HTMLDivElement, ButtonProps>(