Skip to content

Commit

Permalink
Add comment describing placement of ModalProvider, better typing for …
Browse files Browse the repository at this point in the history
…Textarea resize prop
  • Loading branch information
mudrila committed Mar 18, 2024
1 parent e695b8a commit 49c1423
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ui/forms/InputComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface TextareaProps extends Omit<BaseProps, 'children'> {
onChange: React.ChangeEventHandler<HTMLTextAreaElement> | undefined;
placeholder?: string;
rows?: number;
resize?: ResponsiveValue<string>;
resize?: ResponsiveValue<'vertical' | 'horizontal' | 'both' | 'none'>;
}
interface BigNumberProps
extends Omit<BaseProps, 'children' | 'value'>,
Expand Down Expand Up @@ -161,7 +161,7 @@ export function TextareaComponent(props: TextareaProps) {
>
<Textarea
id={id}
resize={resize as any}
resize={resize}
onChange={onChange}
value={value}
isDisabled={disabled}
Expand Down
3 changes: 3 additions & 0 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const router = createBrowserRouter([
{
path: '/',
element: (
// We're placing ModalProvider here instead of src/providers/Providers.tsx due to the need of having router context
// within underlying modals. Otherwise - trying to invoke routing-related hooks would lead to crash.
// Not the best place to have this provider here but also more reasonalbe than putting that into <Layout />
<ModalProvider>
<Layout />
</ModalProvider>
Expand Down

0 comments on commit 49c1423

Please sign in to comment.