Skip to content

Commit

Permalink
default iconSize and titleSize to half of width
Browse files Browse the repository at this point in the history
  • Loading branch information
mguida22 committed Apr 14, 2017
1 parent f9568c4 commit ad9e029
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/avatar/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,30 @@ const Avatar = (props) => {
height,
} = props;

let titleSize = 17;
let iconSize = 17;

if(small) {
width = 34;
height = 34;
titleSize = 17;
iconSize = 17;
} else if (medium) {
width = 50;
height = 50;
titleSize = 25;
iconSize = 25;
} else if (large) {
width = 75;
height = 75;
titleSize = 37.5;
iconSize = 37.5;
} else if (xlarge) {
width = 150;
height = 150;
titleSize = 75;
iconSize = 75;
} else if(!width && !height) {
width = 34;
height = 34;
} else if (!width) {
width = height;
titleSize = width/2;
} else if (!height) {
height = width;
titleSize = height/2;
}

let titleSize = width/2;
let iconSize = width/2;

let Component = onPress || onLongPress ? TouchableOpacity : View;
if (component) {
Component = component;
Expand Down

0 comments on commit ad9e029

Please sign in to comment.