How to use the @emotion/styled.input function in @emotion/styled

To help you get started, we’ve selected a few @emotion/styled examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / flipper / src / ui / components / Input.tsx View on Github external
border: `1px solid ${props.valid ? colors.light15 : colors.red}`,
  borderRadius: 4,
  font: 'inherit',
  fontSize: '1em',

  height: props.compact ? '17px' : '28px',
  lineHeight: props.compact ? '17px' : '28px',
  backgroundColor: props.readOnly ? colors.light02 : undefined,
  '&:disabled': {
    backgroundColor: '#ddd',
    borderColor: '#ccc',
    cursor: 'not-allowed',
  },
});

const Input = styled.input<{
  compact?: boolean;
  valid?: boolean;
  readOnly?: boolean;
}>(({compact, valid, readOnly}) => ({
  ...inputStyle({
    compact: compact || false,
    valid: valid !== false,
    readOnly: readOnly === true,
  }),
  padding: compact ? '0 5px' : '0 10px',
}));

Input.displayName = 'Input';

Input.defaultProps = {
  type: 'text',
github CoreyGinnivan / whocanuse / src / components / control.js View on Github external
const Button = styled.button(props => ({
  backgroundColor: props.selected ? "#F1F9FF" : "#FFFFFF",
  border: props.selected ? "2px solid #0094FF" : "1px solid #E1E1E1",
  boxShadow: "0 1px 6px 0 rgba(0,0,0,0.13)",
  borderRadius: "3px",
  padding: "6px 30px",
  fontFamily: theme.fontFamily,
  fontSize: "16px",
  fontWeight: theme.weight.bold,
  color: props.selected ? theme.color.dark : theme.color.grey,
  "&:hover": {
    cursor: "pointer"
  }
}));

const TextSize = styled.input({
  textAlign: "center",
  backgroundColor: "#FFFFFF",
  border: "1px solid #E1E1E1",
  borderRadius: "3px",
  padding: "6px 0",
  width: "60px",
  fontFamily: theme.fontFamily,
  fontSize: "16px",
  fontWeight: theme.weight.bold,
  color: theme.color.dark,
  marginRight: "6px",
  cursor: "ew-resize"
});

const CheckboxWrapper = styled("label")({
  display: "flex",
github Nexusoft / NexusInterface / src / App / Login / AttemptRecoveryComponent.js View on Github external
padding: '1px',
});

const WordInputBox = styled.div({
  marginLeft: 'auto',
  marginRight: 'auto',
  display: 'grid',
  alignItems: 'center',
  gridTemplateColumns: 'auto auto auto auto',
  gridTemplateRows: 'auto',
  gridGap: '1em .5em',
  padding: '2em',
  overflowX: 'scroll',
});

const WordInput = styled.input({
  background: 'black',
  textAlign: 'center',
  color: 'white',
  fontWeight: 'bold',
});

class AttemptRecoveryComponent extends React.Component {
  returnWordInputBoxes() {
    let boxes = [];
    for (let index = 0; index < 20; index++) {
      boxes.push(
        
      );
    }
    return {boxes};
  }
github CoreyGinnivan / whocanuse / src / components / control / styled.js View on Github external
export const Button = styled.button(props => ({
  backgroundColor: props.selected ? "#F1F9FF" : "#FFFFFF",
  border: props.selected ? "2px solid #0094FF" : "1px solid #E1E1E1",
  boxShadow: "0 1px 6px 0 rgba(0,0,0,0.13)",
  borderRadius: "3px",
  padding: "6px 30px",
  fontFamily: theme.fontFamily,
  fontSize: "16px",
  fontWeight: theme.weight.bold,
  color: props.selected ? theme.color.dark : theme.color.grey,
  "&:hover": {
    cursor: "pointer"
  }
}));

export const TextSize = styled.input({
  textAlign: "center",
  backgroundColor: "#FFFFFF",
  border: "1px solid #E1E1E1",
  borderRadius: "3px",
  padding: "6px 0",
  width: "60px",
  fontFamily: theme.fontFamily,
  fontSize: "16px",
  fontWeight: theme.weight.bold,
  color: theme.color.dark,
  marginRight: "6px",
  cursor: "ew-resize"
});

export const CheckboxWrapper = styled("label")({
  display: "flex",
github DavidWells / analytics / site / gatsby-theme-oss-docs / src / components / search.js View on Github external
'&--highlight': {
        boxShadow: 'none !important',
        color: `${colors.primary} !important`,
        background: 'none !important'
      },
      '&--no-results': {
        padding: 32
      }
    },
    '.algolia-docsearch-footer': {
      margin: 12
    }
  }
})

const StyledInput = styled.input(props => ({
  width: '100%',
  height: 40,
  padding: 0,
  paddingLeft: 16,
  border,
  borderRadius,
  boxShadow: props.resultsShown ? boxShadow : 'none',
  fontSize: 14,
  background: 'white',
  outline: 'none',
  appearance: 'none'
}))

const Overlay = styled.div(
  responsiveStyles,
  position('fixed', 0),
github cloudflare / color / components / TextInput.js View on Github external
import {
  space,
  width,
  display,
  fontSize,
  fontWeight,
  lineHeight,
  textAlign,
  borders,
  borderColor,
  borderRadius,
  color
} from "styled-system"

const Input = styled.input(
  space,
  width,
  display,
  fontSize,
  fontWeight,
  lineHeight,
  textAlign,
  color,
  borders,
  borderColor,
  borderRadius,
  {
    outline: 0,
    boxSizing: "border-box",
    appearance: "none",
    webKitAppearance: "none",
github kitze / JSUI / src / styles / shared-components / index.js View on Github external
transition: 'all 100ms linear',
    borderBottom: '1px solid rgba(0,0,0,0)',
    cursor: 'pointer'
  },
  ({ disable }) => ({
    ...(!disable && {
      '&:hover': {
        borderBottom: '1px solid white'
      }
    })
  })
);

export const acceptStyles = ({ styles }) => styles;

export const TextInput = emotion.input({
  outline: 'none',
  padding: '7px',
  borderRadius: 3,
  minHeight: 35,
  height: 35,
  fontSize: 16,
  transition: 'all 150ms linear',
  color: 'white',
  border: `1px solid ${whiteish(0.15)}`,
  backgroundColor: whiteish(0.1),
  '&::placeholder': {
    color: 'rgba(255, 255, 255, 0.5)'
  },
  '&:focus': {
    backgroundColor: whiteish(0.17),
    border: `1px solid rgba(255, 255, 255, ${whiteish(0.2)})`
github OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / datalad / fragments / text-input.jsx View on Github external
transition: 'top 100ms, font-size 100ms',
    transitionTimingFunction: 'ease-out',
    textAlign: 'left',
  },
  ({ hasValue, hasFocus }) => ({
    ...(hasValue || hasFocus ? pushedUpLabelStyles : centerLabelStyles),
    ':focus': pushedUpLabelStyles,
  }),
)
const DisabledIcon = styled.i({
  position: 'absolute',
  top: '0.4rem',
  right: '0.4rem',
  color: '#5cb85c',
})
const Input = styled.input({
  border: 'none',
  width: '100%',
  height: '100%',
  padding: '1.5rem 0.8rem 0.3rem',
  textAlign: 'left',
})
const Textarea = styled.textarea({
  width: '100%',
  border: '1px inset #eee',
  borderRadius: '5px',
  textAlign: 'left',
  padding: '1.5rem 0.8rem 0.3rem',
})

const TextInput = ({
  name,
github CoreyGinnivan / whocanuse / src / components / control.js View on Github external
position: "absolute",
  minWidth: "120px",
  width: '100%',
  height: "100px",
  backgroundColor: "#" + props.color,
  border: "1px solid #FFFFFF",
  borderRadius: "4px",
  zIndex: "10",
  top: "55px",
  right: '-25px',
  "&:before": {
    border: "2px solid rgba(0, 0, 0, 0.05)"
  }
}));

const HexWrapper = styled.input(props => ({
  color: props.textColour,
  position: "absolute",
  backgroundColor: "transparent",
  top: "10px",
  left: "24px",
  borderRadius: "3px",
  display: "flex",
  width: "80px",
  padding: "4px",
  fontWeight: theme.weight.bold,
  border: "1px solid #FFFFFF",
  boxShadow: "inset 0 0 0 1px #E6E6E6"
}));

const Hash = styled.div(props => ({
  color: props.textColour,
github cloudflare / color / elements / InputSubmit.js View on Github external
import styled from '@emotion/styled'
import {
  space,
  width,
  display,
  fontSize,
  fontWeight,
  lineHeight,
  borders,
  borderColor,
  borderRadius,
  color
} from "styled-system"

const InputSubmit = styled.input(
  space,
  width,
  display,
  fontSize,
  fontWeight,
  lineHeight,
  color,
  borders,
  borderColor,
  borderRadius,
  {}
)

InputSubmit.defaultProps = {
  type: "submit"
}