styled-components#FlattenSimpleInterpolation TypeScript Examples

The following examples show how to use styled-components#FlattenSimpleInterpolation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: styles.ts    From rocketseat-gostack-11-desafios with MIT License 6 votes vote down vote up
DropContainer = styled.div.attrs({
  className: 'dropzone',
})`
  border: 1.5px dashed #969cb3;
  border-radius: 5px;
  cursor: pointer;

  transition: height 0.2s ease;

  ${(props: UploadProps): false | FlattenSimpleInterpolation =>
    props.isDragActive && dragActive}

  ${(props: UploadProps): false | FlattenSimpleInterpolation =>
    props.isDragReject && dragReject}
`
Example #2
Source File: styles.ts    From react-memory-game with MIT License 5 votes vote down vote up
RestartButton = styled(Button)<{ isPaused?: boolean }>`
  ${({ isPaused }): FlattenSimpleInterpolation | null =>
    !isPaused ? DisabledButtonStyle : null}
`