Advertisement
fatalryuu

Untitled

Oct 2nd, 2023
926
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { CustomSxProps } from 'types';
  2.  
  3. const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
  4.  
  5. export const taskWrapperStyles = (isNew: boolean): CustomSxProps => ({
  6.     fontFamily: (theme) => theme.typography.fontFamily,
  7.     border: (theme) => `1px solid ${isNew ? theme.palette.primary.main : theme.palette.secondary.main}`,
  8.     borderRadius: '5px',
  9.     padding: '16px 24px',
  10.     height: 110,
  11. });
  12.  
  13. export const taskNameStyles: CustomSxProps = {
  14.     fontStyle: 'italic',
  15.     fontWeight: 600,
  16.     color: (theme) => theme.palette.grey[600],
  17. };
  18.  
  19. export const taskDateStyles: CustomSxProps = {
  20.     fontStyle: 'italic',
  21.     fontSize: 14,
  22.     marginRight: '4px',
  23.     paddingTop: '4px',
  24. };
  25.  
  26. const GAP = 70;
  27. const BUTTON_WIDTH = 9;
  28.  
  29. export const taskDescriptionStyles = (taskWidth: number): CustomSxProps => ({
  30.     flexGrow: 1,
  31.     maxWidth: taskWidth - BUTTON_WIDTH * rem - GAP,
  32.     border: (theme) => `1px solid ${theme.palette.secondary.main}`,
  33.     color: (theme) => `${theme.palette.grey[600]}`,
  34.     borderRadius: '10px',
  35.     padding: '12px',
  36.     wordBreak: 'break-word',
  37.     overflow: 'hidden',
  38.     textOverflow: 'ellipsis',
  39.     whiteSpace: 'nowrap',
  40. });
  41.  
  42. export const buttonStyles: CustomSxProps = {
  43.     display: 'flex',
  44.     alignItems: 'center',
  45.     border: (theme) => `1px solid ${theme.palette.success.main}`,
  46.     borderRadius: '10px',
  47.     textAlign: 'center',
  48.     flexBasis: `${BUTTON_WIDTH}rem`,
  49.     height: 43,
  50.     paddingRight: 2,
  51. };
  52.  
  53. export const buttonTextStyles: CustomSxProps = {
  54.     fontStyle: 'italic',
  55.     fontSize: 14,
  56.     color: (theme) => theme.palette.success.main,
  57. };
  58.  
  59. export const seeMoreStyles: CustomSxProps = {
  60.     display: 'flex',
  61.     flexBasis: `${BUTTON_WIDTH}rem`,
  62.     fontStyle: 'italic',
  63.     color: (theme) => theme.palette.grey[600],
  64.     cursor: 'pointer',
  65. };
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement