mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
test(client): update shared component mocks
This commit is contained in:
parent
6c52fe6a47
commit
3dac0328ce
2 changed files with 8 additions and 0 deletions
|
|
@ -94,6 +94,9 @@ jest.mock('@librechat/client', () => ({
|
|||
</button>
|
||||
),
|
||||
Input: (props: React.ComponentProps<'input'>) => <input {...props} />,
|
||||
Label: ({ children, ...props }: React.ComponentProps<'label'>) => (
|
||||
<label {...props}>{children}</label>
|
||||
),
|
||||
Radio: () => null,
|
||||
OGDialog: ({ open, children }: { open: boolean; children: React.ReactNode }) =>
|
||||
open ? <div>{children}</div> : null,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ jest.mock(
|
|||
...props
|
||||
}: React.ButtonHTMLAttributes<HTMLButtonElement> & { variant?: string }) =>
|
||||
React.createElement('button', props, children),
|
||||
Input: React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
|
||||
(props, ref) => React.createElement('input', { ...props, ref }),
|
||||
),
|
||||
Label: ({ children, ...props }: React.LabelHTMLAttributes<HTMLLabelElement>) =>
|
||||
React.createElement('label', props, children),
|
||||
OGDialog: ({ open, children }: { open: boolean; children: ReactNode }) =>
|
||||
open ? React.createElement(React.Fragment, null, children) : null,
|
||||
OGDialogContent: ({ children }: { children: ReactNode }) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue