Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
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",
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};
}
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",
'&--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),
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",
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)})`
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,
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,
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"
}