the0938

Untitled

Jan 26th, 2021
621
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const textFont = (props) =>
  2.   props.theme.get("TextInput.textFont") ??
  3.   props.theme.get("Input.textFont") ??
  4.   props.theme.get("TextFont.default") ??
  5.   "inherit";
  6.  
  7. const textColor = (props) =>
  8.   props.theme.getColor("TextInput.textColor") ??
  9.   props.theme.getColor("Input.textColor") ??
  10.   props.theme.getColor("Color.primary") ??
  11.   "inherit";
  12.  
  13. const textSize = (props) =>
  14.   props.theme.getUnit("TextInput.textSize") ??
  15.   props.theme.getUnit("Input.textSize") ??
  16.   props.theme.getUnit("TextSize.1") ??
  17.   "inherit";
  18.  
  19. const textLine = (props) =>
  20.   props.theme.getUnit("TextInput.textLine") ??
  21.   props.theme.getUnit("Input.textLine") ??
  22.   props.theme.getUnit("TextLine.1") ??
  23.   null;
  24.  
  25. const paddingX = (props) =>
  26.   props.theme.getUnit("TextInput.paddingX") ??
  27.   props.theme.getUnit("Input.paddingX") ??
  28.   props.theme.getUnit("Space.1") ??
  29.   null;
  30.  
  31. const paddingY = (props) =>
  32.   props.theme.getUnit("TextInput.paddingX") ??
  33.   props.theme.getUnit("Input.paddingX") ??
  34.   props.theme.getUnit("Space.1") ??
  35.   null;
  36.  
  37. export const Input = styled.input`
  38.   font-family: ${textFont};
  39.   line-height: ${textLine};
  40.   font-size: ${textSize};
  41.   color: ${textColor};
  42.  
  43.   padding: ${paddingX} ${paddingY};
  44. `;
  45.  
RAW Paste Data