Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sandulat committed Nov 12, 2023
1 parent ac8460c commit 4fe4c37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/docs/src/builders/basic-form-builder/basic-form-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function Preview(props: {
Preview Form
</Button>
<Dialog modal open={previewVisible} onOpenChange={setPreviewVisible}>
<DialogContent className="top-[20%] translate-y-0">
<DialogContent className="sm:top-[20%] sm:translate-y-0">
<DialogHeader>
<DialogTitle>Preview</DialogTitle>
</DialogHeader>
Expand Down Expand Up @@ -365,7 +365,7 @@ export function BasicFormBuilder() {
) : null}
<div
className={cn("grid", {
"mt-6 grid-cols-2 gap-8": rootEntities.length,
"mt-6 gap-8 sm:grid-cols-2": rootEntities.length,
})}
>
{!rootEntities.length ? (
Expand Down Expand Up @@ -413,7 +413,7 @@ export function BasicFormBuilder() {
return (
<SortableItem id={props.entity.id}>
<div className="relative">
<div className="absolute inset-0 -mx-4 -mb-4 -mt-2 rounded-xl bg-neutral-950" />
<div className="absolute inset-0 -mx-2 -mb-4 -mt-2 rounded-xl bg-neutral-950 sm:-mx-4" />
<div
className="pointer-events-none relative"
tabIndex={-1}
Expand All @@ -427,7 +427,7 @@ export function BasicFormBuilder() {
<button
type="button"
className={cn(
"absolute inset-0 -mx-4 -mb-4 -mt-2 rounded-xl border-2 transition-all",
"absolute inset-0 -mx-2 -mb-4 -mt-2 rounded-xl border-2 transition-all sm:-mx-4",
isActive
? "border-white"
: "border-transparent hover:border-white/30",
Expand All @@ -442,7 +442,7 @@ export function BasicFormBuilder() {
{isActive ? (
<button
type="button"
className="absolute -right-6 -top-4 flex h-5 w-5 items-center justify-center rounded-full bg-white"
className="absolute -right-3 -top-4 flex h-5 w-5 items-center justify-center rounded-full bg-white sm:-right-6"
onClick={() =>
builderStore.deleteEntity(props.entity.id)
}
Expand All @@ -458,7 +458,7 @@ export function BasicFormBuilder() {
</SortableContext>
</DndContext>
</div>
<Dialog>
<Dialog modal>
<div className="flex justify-center">
<DialogTrigger asChild>
<Button
Expand Down
2 changes: 2 additions & 0 deletions packages/basebuilder-react/src/attributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export function createAttributeComponent<TAttribute extends Attribute>(
(event.name === builderStoreEventsNames.EntityAttributeErrorUpdated &&
event.payload.entity.id === entityId &&
event.payload.attributeName === attribute.name) ||
event.name === builderStoreEventsNames.EntityAdded ||
event.name === builderStoreEventsNames.EntityDeleted ||
event.name === builderStoreEventsNames.DataSet,
),
);
Expand Down

0 comments on commit 4fe4c37

Please sign in to comment.