mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-16 12:10:28 +03:00
Fix theme
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
18dc02c700
commit
630dbee817
5 changed files with 52 additions and 25 deletions
|
|
@ -8,7 +8,7 @@ import Text from '../text/Text';
|
|||
import RawIcon from '../system-icons/RawIcon';
|
||||
|
||||
function Avatar({
|
||||
text, bgColor, iconSrc, imageSrc, size,
|
||||
text, bgColor, iconSrc, iconColor, imageSrc, size,
|
||||
}) {
|
||||
const [image, updateImage] = useState(imageSrc);
|
||||
let textSize = 's1';
|
||||
|
|
@ -30,7 +30,7 @@ function Avatar({
|
|||
>
|
||||
{
|
||||
iconSrc !== null
|
||||
? <RawIcon size={size} src={iconSrc} />
|
||||
? <RawIcon size={size} src={iconSrc} color={iconColor} />
|
||||
: text !== null && (
|
||||
<Text variant={textSize} weight="medium" primary>
|
||||
{twemojify([...text][0])}
|
||||
|
|
@ -48,6 +48,7 @@ Avatar.defaultProps = {
|
|||
text: null,
|
||||
bgColor: 'transparent',
|
||||
iconSrc: null,
|
||||
iconColor: null,
|
||||
imageSrc: null,
|
||||
size: 'normal',
|
||||
};
|
||||
|
|
@ -56,6 +57,7 @@ Avatar.propTypes = {
|
|||
text: PropTypes.string,
|
||||
bgColor: PropTypes.string,
|
||||
iconSrc: PropTypes.string,
|
||||
iconColor: PropTypes.string,
|
||||
imageSrc: PropTypes.string,
|
||||
size: PropTypes.oneOf(['large', 'normal', 'small', 'extra-small']),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue