@universal-tennis/ui-shared 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import React, {ReactElement} from 'react';
2
2
  import MuiButton from '@mui/material/Button';
3
3
  import { styled } from '@mui/material/styles';
4
+ import {colors} from '../../theme/colors';
4
5
 
5
6
  type ButtonProps = {
6
7
  children: string | ReactElement;
@@ -28,37 +29,37 @@ const StyledButton = styled(MuiButton)({
28
29
  });
29
30
 
30
31
  const PrimaryButton = styled(StyledButton)((props: StyledButtonProps) => ({
31
- backgroundColor: 'var(--black)',
32
- color: 'var(--white)',
32
+ backgroundColor: colors.black,
33
+ color: colors.white,
33
34
  width: props.isExpanded ? '100%' : 'inherit',
34
35
 
35
36
  '&:hover': {
36
- backgroundColor: 'var(--darkest-grey)',
37
- borderColor: 'var(--darkest-grey)',
37
+ backgroundColor: colors.darkestGrey,
38
+ borderColor: colors.darkestGrey,
38
39
  },
39
40
  '&:disabled': {
40
- backgroundColor: 'var(--lightest-grey)',
41
- borderColor: 'var(--lightest-grey)',
41
+ backgroundColor: colors.lightGrey,
42
+ borderColor: colors.lightGrey,
42
43
  },
43
44
  }));
44
45
 
45
46
  const SecondaryButton = styled(StyledButton)({
46
- borderColor: 'var(--black)',
47
+ borderColor: colors.black,
47
48
  backgroundColor: 'transparent',
48
- color: 'var(--black)',
49
+ color: colors.black,
49
50
 
50
51
  '&:hover': {
51
- borderColor: 'var(--darkest-grey)',
52
+ borderColor: colors.darkestGrey,
52
53
  },
53
54
  '&:disabled': {
54
- borderColor: 'var(--disabled)'
55
+ borderColor: colors.disabled
55
56
  },
56
57
  });
57
58
 
58
59
  const LinkButton = styled(MuiButton)({
59
60
  borderColor: 'transparent',
60
61
  backgroundColor: 'transparent',
61
- color: 'var(--primary)',
62
+ color: colors.primary,
62
63
  textTransform: 'inherit',
63
64
  justifyContent: 'left',
64
65
  padding: 0,
@@ -68,7 +69,7 @@ const LinkButton = styled(MuiButton)({
68
69
  },
69
70
 
70
71
  '&:disabled': {
71
- borderColor: 'var(--disabled)'
72
+ borderColor: colors.disabled
72
73
  },
73
74
  });
74
75
 
@@ -1,7 +1,6 @@
1
1
  import React, {ReactElement} from 'react';
2
2
  import MuiTypography from '@mui/material/Typography';
3
3
  import { styled } from '@mui/material/styles';
4
- import "../../assets/css/typography.scss";
5
4
 
6
5
  type TypographyProps = {
7
6
  children: string | ReactElement;
@@ -53,19 +52,19 @@ const SECONDARY_SIZES = {
53
52
  };
54
53
 
55
54
  const DisplayTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
56
- fontFamily: 'var(--display-font)',
55
+ fontFamily: `'UTR Numerals', 'Tungsten A', 'Tungsten B'`,
57
56
  fontSize: DISPLAY_SIZES[props.size as keyof typeof DISPLAY_SIZES],
58
57
  fontWeight: props.weight
59
58
  }));
60
59
 
61
60
  const PrimaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
62
- fontFamily: 'var(--primary-font)',
61
+ fontFamily: `'Tungsten A', 'Tungsten B', 'Helvetica', Arial, sans-serif`,
63
62
  fontSize: PRIMARY_SIZES[props.size as keyof typeof PRIMARY_SIZES],
64
63
  fontWeight: props.weight
65
64
  }));
66
65
 
67
66
  const SecondaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
68
- fontFamily: 'var(--secondary-font)',
67
+ fontFamily: `'Gotham SSm A', 'Gotham SSm B', 'Helvetica', Arial, sans-serif`,
69
68
  fontSize: SECONDARY_SIZES[props.size as keyof typeof SECONDARY_SIZES],
70
69
  textTransform: props.isCap ? 'uppercase' : 'inherit',
71
70
  fontWeight: props.weight
@@ -13,11 +13,11 @@ type ContactCardProps = {
13
13
  name: string;
14
14
  phone: string;
15
15
  email: string;
16
- handleOnMessageClick?: VoidFunction;
16
+ onMessageClick?: VoidFunction;
17
17
  }
18
18
 
19
19
  export default function ContactCard({
20
- name, phone, email, handleOnMessageClick, ...props
20
+ name, phone, email, onMessageClick, ...props
21
21
  }: ContactCardProps) {
22
22
  const firstName = name.split(" ")[0];
23
23
  const parsedNumber = parsePhoneNumber(phone || '');
@@ -40,7 +40,7 @@ export default function ContactCard({
40
40
  <Typography category="secondary" size="x-small-book">{email}</Typography>
41
41
  </Link>
42
42
  )}
43
- <Button onClick={handleOnMessageClick} category="link" style={{marginTop: '8px'}}>
43
+ <Button onClick={onMessageClick} category="link" style={{marginTop: '8px'}}>
44
44
  <>
45
45
  <img src={ChatIcon} alt="message" style={{width: '20px'}} />
46
46
  <Typography style={{paddingLeft: '8px'}} category="secondary" size="x-small-book">
@@ -1,12 +1,13 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
+ import { colors } from 'stories/theme/colors';
3
4
 
4
5
  export const StyledCard = styled(Box)({
5
6
  display: 'flex',
6
7
  flexDirection: 'column',
7
8
  borderRadius: '4px',
8
9
  padding: '16px',
9
- border: '1px solid var(--cool-grey-300)',
10
+ border: `1px solid ${colors.coolGrey300}`,
10
11
 
11
12
  '&:hover': {
12
13
  cursor: 'pointer'
@@ -0,0 +1,10 @@
1
+ export const colors = {
2
+ primary: '#008ded',
3
+ secondary: '#e0004f',
4
+ disabled: '#bac6d6',
5
+ black: '#000',
6
+ white: '#fff',
7
+ lightGrey: '#d7e0ea',
8
+ darkestGrey: '#3b4859',
9
+ coolGrey300: '#DDE3EB'
10
+ };
@@ -1,12 +0,0 @@
1
- :root {
2
- --primary: #008ded;
3
- --secondary: #e0004f;
4
- --disabled: #bac6d6;
5
- --black: #000;
6
- --white: #fff;
7
- --light-grey: #d7e0ea;
8
- --darkest-grey: #3b4859;
9
-
10
- /* colors */
11
- --cool-grey-300: #DDE3EB;
12
- }
@@ -1,12 +0,0 @@
1
- :root {
2
- --primary: #008ded;
3
- --secondary: #e0004f;
4
- --disabled: #bac6d6;
5
- --black: #000;
6
- --white: #fff;
7
- --light-grey: #d7e0ea;
8
- --darkest-grey: #3b4859;
9
-
10
- /* colors */
11
- --cool-grey-300: #DDE3EB;
12
- }