@integrigo/integrigo-ui 1.6.16-c → 1.6.16-e

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,14 @@ type ProfileProps = Partial<React.ComponentProps<typeof Avatar>> & {
10
10
  children?: React.ReactNode;
11
11
  };
12
12
 
13
+ const fontSizeVariant = {
14
+ s: 12,
15
+ m: 16,
16
+ l: 20,
17
+ xl: 24,
18
+ xxl: 32,
19
+ };
20
+
13
21
  const getInitials = (text: string): string =>
14
22
  text
15
23
  .split(' ')
@@ -32,7 +40,7 @@ export const Profile: React.FC<ProfileProps> = ({
32
40
  )}
33
41
 
34
42
  <Details>
35
- <Name as="span">{name}</Name>
43
+ <Name as="span" size={size}>{name}</Name>
36
44
  {children}
37
45
  </Details>
38
46
  </Root>
@@ -40,14 +48,15 @@ export const Profile: React.FC<ProfileProps> = ({
40
48
 
41
49
  const Root = styled.div`
42
50
  display: flex;
43
- gap: var(--padding-m);
51
+ gap: var(--padding-s);
44
52
  align-items: center;
45
53
  `;
46
54
 
47
55
  Root.displayName = 'Root';
48
56
 
49
- const Name = styled(Hero)`
57
+ const Name = styled(Hero)<{ size: ProfileProps['size']}>`
50
58
  font-weight: var(--font-bold);
59
+ font-size: ${p => fontSizeVariant[p.size || 'm']}px;
51
60
  `;
52
61
 
53
62
  Name.displayName = 'Name';