Skip to content

Instantly share code, notes, and snippets.

@favna
Created February 25, 2025 08:28
Show Gist options
  • Save favna/abe1f154620b3c36fef8f34e42caf55e to your computer and use it in GitHub Desktop.
Save favna/abe1f154620b3c36fef8f34e42caf55e to your computer and use it in GitHub Desktop.
// src/whatever/my/path/is/component.ts
import { CustomComponentFormModal } from '@our-org/our-design-system-package';
export function ParentComponent() {
const form = useForm({
defaultValues: {
name: 'John Connor',
age: 99
});
return (
<CustomComponentFormModal /* form={form} presumably this prop is no longer necessary with the new API? */ otherProps={...otherProps} />
)
}
// @our-org/our-design-system-package
interface CustomComponentFormModalProps {
// form: <some type here> Presumably not necessary anymore
otherProps: some type here
}
export function CustomComponentFormModal {
return <the-material-ui-powered-dialog-with-tanstack-form-component-tree /> // (it has a `<form>`, `<button type="submit"`>, and various MUI components)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment