Selaa lähdekoodia

Bugfix: Avatar Group style fix.

lfabl 5 tuntia sitten
vanhempi
commit
ab36dbf0b5
2 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 2 0
      example/src/pages/home/index.tsx
  2. 3 0
      src/components/avatar/stylesheet.ts

+ 2 - 0
example/src/pages/home/index.tsx

@@ -72,9 +72,11 @@ const Home = () => {
             isWorkWithAction={true}
             avatars={[
                 {
+                    // imageUrl: "https://fotolifeakademi.com/uploads/2020/04/manzara-fotografi-cekmek-724x394.webp",
                     title: "Furkan Atakan BOZKURT"
                 },
                 {
+                    imageUrl: "https://fotolifeakademi.com/uploads/2020/04/manzara-fotografi-cekmek-724x394.webp",
                     title: "Mahmut PEKER"
                 }
             ]}

+ 3 - 0
src/components/avatar/stylesheet.ts

@@ -130,6 +130,8 @@ export const useStyles = ({
             width: currentSize.size
         } as Mutable<ViewStyle>,
         image: {
+            borderColor: borderColor && borderColor !== "transparent" ? colors.content.border[borderColor] : avatarBackgroundColor ? colors.content.container[avatarBackgroundColor] : "transparent",
+            borderRadius: currentSize.size / 2,
             height: currentSize.size,
             width: currentSize.size
         } as Mutable<ImageStyle>,
@@ -146,6 +148,7 @@ export const useStyles = ({
 
     if(isShowBorder) {
         styles.container.borderWidth = borders.subtract;
+        styles.image.borderWidth = borders.subtract;
     }
 
     if(!title && !image && !imageUrl && !backgroundColor) {