Skip to content

Commit

Permalink
Merge pull request #709 from gympass/fix/adjust-avatar-native
Browse files Browse the repository at this point in the history
🐞 fix(avatar-native): add propTypes and defaultProps to avatar native
  • Loading branch information
matheushdsbr authored Nov 7, 2023
2 parents 50e7fe8 + be77d18 commit 3e61ecc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/yoga/src/Avatar/native/Avatar.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { forwardRef } from 'react';
import { BuildingFilled } from '@gympass/yoga-icons';
import { string, func } from 'prop-types';
import { string, func, number } from 'prop-types';
import { ImagePropTypes } from 'deprecated-react-native-prop-types';
import { Image, StyleSheet } from 'react-native';

Expand Down Expand Up @@ -46,9 +46,9 @@ const Avatar = forwardRef(
children,
fill,
stroke,
borderRadius = 'small',
width = 48,
height = 48,
borderRadius,
width,
height,
...props
},
ref,
Expand Down Expand Up @@ -105,12 +105,18 @@ Avatar.propTypes = {
src: ImagePropTypes.source,
icon: func,
fill: string,
width: number,
height: number,
borderRadius: string,
...Box.propTypes,
};

Avatar.defaultProps = {
src: undefined,
fill: 'white',
width: 48,
height: 48,
borderRadius: 'small',
...Box.defaultProps,
};

Expand Down

0 comments on commit 3e61ecc

Please sign in to comment.