Remove use of default props (#4118)
* refactor: replace defaultProps with function parameters in Modal, Statusbar, ChatContainer, and CrossfadeImage components * New commit for Default properties of React components after syncing fork and rebasing * fix: fix linter warning --------- Co-authored-by: swarup <swarupnarkhede999@gmail.com>
This commit is contained in:
@@ -21,8 +21,8 @@ export const CrossfadeImage: FC<CrossfadeImageProps> = ({
|
||||
src = '',
|
||||
width,
|
||||
height,
|
||||
objectFit = 'fill',
|
||||
duration = '1s',
|
||||
objectFit = 'fill', // default value for objectFit
|
||||
duration = '3s', // default value for duration
|
||||
className,
|
||||
}) => {
|
||||
const spanStyle: React.CSSProperties = useMemo(
|
||||
@@ -70,8 +70,3 @@ export const CrossfadeImage: FC<CrossfadeImageProps> = ({
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
CrossfadeImage.defaultProps = {
|
||||
objectFit: 'fill',
|
||||
duration: '3s',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user