This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import clsx from 'clsx'; | |
import { getDisplayName, __DEV__ } from '@/utils/helpers'; | |
export type withClassNameProps = { | |
className?: string; | |
}; | |
export function withClassName<T, P extends object>( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function withClassName<Props extends object>( | |
WrappedComponent: | |
| React.ComponentType<Props> | |
| React.ForwardRefExoticComponent<Props>, | |
classes?: string, | |
) { | |
const WithClassName = (props: Props & { className?: string }) => | |
React.createElement(WrappedComponent, { | |
...props, | |
className: clsx(props.className, classes), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ArgumentMetadata, | |
HttpStatus, | |
Injectable, | |
Optional, | |
PipeTransform | |
} from '@nestjs/common'; | |
import { | |
ErrorHttpStatusCode, | |
HttpErrorByCode |