mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Update avatar component
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { Wrapper } from './styles';
|
||||
|
||||
type AvatarProps = {
|
||||
className?: string;
|
||||
color?: 'client' | 'productOwner' | 'developer' | 'admin' | string;
|
||||
size?: 'small' | 'big';
|
||||
text: string;
|
||||
};
|
||||
|
||||
const Avatar = ({ color, size = 'small', text }: AvatarProps) => {
|
||||
const Avatar = ({ color, size = 'small', text, className }: AvatarProps) => {
|
||||
return (
|
||||
<Wrapper color={color} size={size}>
|
||||
<Wrapper color={color} size={size} className={className}>
|
||||
{text}
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -6,11 +6,12 @@ type WrapperProps = {
|
||||
};
|
||||
|
||||
export const Wrapper = styled.div<WrapperProps>`
|
||||
user-select: none;
|
||||
border-radius: 50%;
|
||||
background: ${({ theme, color }) =>
|
||||
color ? theme.colors[color].main : theme.colors.client.main};
|
||||
color: ${({ theme }) => theme.colors.white.main};
|
||||
display: grid;
|
||||
display: inline-grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user