mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
added missing logo util
This commit is contained in:
parent
e2c5e6a8d6
commit
1e23bc25ae
@ -567,7 +567,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@ -639,7 +639,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
|
40
app/mobile/src/utils/Logo.jsx
Normal file
40
app/mobile/src/utils/Logo.jsx
Normal file
@ -0,0 +1,40 @@
|
||||
import { useState } from 'react';
|
||||
import { Image, View } from 'react-native';
|
||||
import avatar from 'images/avatar.png';
|
||||
import appstore from 'images/appstore.png';
|
||||
import solution from 'images/solution.png';
|
||||
import team from 'images/team.png';
|
||||
|
||||
export function Logo({ src, width, height, radius }) {
|
||||
|
||||
const [source, setSource] = useState(null);
|
||||
|
||||
if (src != source) {
|
||||
setSource(src);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{ borderRadius: radius, overflow: 'hidden', width, height }}>
|
||||
{ source === 'team' && (
|
||||
<Image source={team} style={{ width, height }} />
|
||||
)}
|
||||
{ source === 'avatar' && (
|
||||
<Image source={avatar} style={{ width, height }} />
|
||||
)}
|
||||
{ source === 'appstore' && (
|
||||
<Image source={appstore} style={{ width, height }} />
|
||||
)}
|
||||
{ source === 'solution' && (
|
||||
<Image source={solution} style={{ width, height }} />
|
||||
)}
|
||||
{ !source && (
|
||||
<Image source={avatar} style={{ width, height }} />
|
||||
)}
|
||||
{ source && source.startsWith('http') && (
|
||||
<Image source={{ uri:source }} resizeMode={'contain'} style={{ width, height }} />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
3
app/mobile/src/utils/package.json
Normal file
3
app/mobile/src/utils/package.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "utils"
|
||||
}
|
Loading…
Reference in New Issue
Block a user