All files / app/components/home/transaction-list transaction-list-item-pseudo.ts

0% Statements 0/8
0% Branches 0/4
0% Functions 0/2
0% Lines 0/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58                                                                                                                   
import styled from '@emotion/styled';
import { color } from '@stacks/ui';
 
export function listHoverProps(hovered: boolean) {
  return hovered
    ? ({
        background: color('bg-3'),
        borderRadius: '8px',
        zIndex: -1,
        position: 'absolute',
        display: 'block',
        width: 'calc(100% + 20px)',
        height: 'calc(100% + 16px)',
        left: '-8px',
        top: '-8px',
      } as const)
    : {};
}
 
export function listFocusedProps(focused: boolean) {
  return focused
    ? ({
        position: 'absolute',
        border: '1px solid #C5CCFF',
        boxShadow: '0 0 0 3px rgba(170,179,255,0.75)',
        borderRadius: '4px',
        width: 'calc(100% + 20px)',
        height: 'calc(100% + 16px)',
        left: '-8px',
        top: '-8px',
      } as const)
    : {};
}
 
// Component is required owing to glitch with ui lib
// where content style isn't applied to _before prop
export const EnableBefore = styled.button`
  width: 100%;
 
  &::before {
    content: '';
  }
 
  &::after {
    content: '';
  }
`;
 
export const templateTxBoxProps = {
  flexDirection: 'column' as const,
  borderRadius: '8px',
  boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.04);',
  border: `1px solid ${color('border')}`,
  minHeight: ['152px', '152px', '300px', '416px'],
  justifyContent: 'center',
  alignItems: ['center', 'center', null, null],
};