All files / src/components/ui/form InputGroup.tsx

0% Statements 0/7
100% Branches 0/0
100% Functions 0/0
0% Lines 0/7

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 59 60 61 62 63 64 65 66 67 68 69 70                                                                                                                                           
import styled from "styled-components";
import { StyledInput } from "./style";
import { ToggleButtonGroupWrapper } from "ui/form/ToggleButtonGroup";
import { StyledButton } from "ui/buttons/style";
 
export const InputGroup = styled.div`
  display: flex;
  width: 100%;
 
  &
    > div:not(:first-child)
    ${StyledInput},
    &
    > ${StyledInput}:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  & > ${ToggleButtonGroupWrapper}:not(:first-child),
  & > ${ToggleButtonGroupWrapper}:not(:first-child) > :first-child > label {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  & > div:not(:first-child) .CustomSelect .CustomSelect__control,
  & > .CustomSelect:not(:first-child) .CustomSelect__control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  & > div:not(:first-child) .MentionsInput__control textarea {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
 
  & > div:not(:last-child) ${StyledInput}, & > ${StyledInput}:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  & > ${ToggleButtonGroupWrapper}:not(:last-child),
  & > ${ToggleButtonGroupWrapper}:not(:last-child) > :last-child > label {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  & > div:not(:last-child) .CustomSelect .CustomSelect__control,
  & > .CustomSelect:not(:last-child) .CustomSelect__control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  & > div:not(:last-child) .MentionsInput__control textarea {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
`;
 
export const InputGroupPrepend = styled.div`
  ${StyledButton} {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
    height: 28px;
  }
`;
 
export const InputGroupAppend = styled.div`
  ${StyledButton} {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    height: 28px;
  }
`;