Skip to content

Commit

Permalink
chore: reset dev file
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 committed Mar 5, 2024
1 parent 5d294a8 commit 1a62c1c
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions packages/core/dev/App.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
import { NumberField } from "../src";

export default function App() {
let formRef: HTMLFormElement | undefined;

const onSubmit = (e: SubmitEvent) => {
e.preventDefault();
e.stopPropagation();

const formData = new FormData(formRef);

alert(JSON.stringify(Object.fromEntries(formData), null, 2));
};

return (
<form ref={formRef} onSubmit={onSubmit} class="flex flex-col items-center space-y-6">
<NumberField.Root name="field-name" defaultValue={10000000}>
<NumberField.Label>Label</NumberField.Label>
<NumberField.HiddenInput />
<NumberField.Input />
<NumberField.IncrementTrigger>+</NumberField.IncrementTrigger>
<NumberField.DecrementTrigger>-</NumberField.DecrementTrigger>
<NumberField.Description>Description</NumberField.Description>
<NumberField.ErrorMessage>Error message</NumberField.ErrorMessage>
</NumberField.Root>
<div class="flex space-x-2">
<button type="reset" class="kb-button">
Reset
</button>
<button type="submit" class="kb-button-primary">
Submit
</button>
</div>
</form>
<></>
);
}

0 comments on commit 1a62c1c

Please sign in to comment.