UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

111 lines (103 loc) 3 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var styled = require('styled-components'); var styled__default = _interopDefault(styled); const Wrapper = styled__default.div ` position: relative; ${props => props.multiple ? ` padding: 2rem; border-radius:${props.theme.radii.boxes}; background: ${props.theme.colors.white}; border-color: ${props.theme.colors.gray2}; border-style: dashed; border-width: 4px; display: flex; flex-direction: column; align-items: center; ` : ``} `; const PreviewIcon = styled__default.span ` svg { color: ${props => props.theme.colors.secondary}; margin-right: 0.5rem; } `; const Preview = styled__default.img ` object-fit: cover; width: 100%; `; const BoxFilePreviewWrapper = styled__default.div ` position: relative; z-index: 11; `; const FilePreviewWrapper = styled__default.div ` position: relative; margin-top: 1rem; max-width: 8rem; text-align: center; background: white; overflow: hidden; font-size: 0.7rem; box-shadow: ${props => props.theme.fileInput.wrapper.boxShadow}; border-radius: ${props => props.theme.fileInput.wrapper.borderRadius}; color: ${props => props.theme.fileInput.wrapper.color}; border-width: ${props => props.theme.fileInput.wrapper.borderWidth}; border-style: ${props => props.theme.fileInput.wrapper.borderStyle}; border-color: ${props => props.theme.fileInput.wrapper.borderColor}; `; const ImagePreviewInfoLabel = styled__default.span ` color: ${props => props.theme.font.color}; `; const PreviewInfo = styled__default.div ` padding: ${props => props.theme.fileInput.info.padding}; `; const ImagePreviewWrapper = styled__default.div ` position: relative; height: 5rem; svg { height: 3rem; width: 3rem; margin-top: 1rem; } `; const RemoveFileButton = styled__default.div ` position: absolute; top: -10px; right: -10px; z-index: 12; background: ${props => props.theme.colors.gray3}; border-radius: 50%; height: 25px; width: 25px; display: flex; align-items: center; justify-content: center; button { color: ${props => props.theme.colors.white}; cursor: pointer; } `; const FileWidgetInput = styled__default.input ` z-index: 10; display: block; width: 100%; height: 100%; position: absolute; font-size: 0; background: transparent; opacity: 0; cursor: pointer; `; exports.BoxFilePreviewWrapper = BoxFilePreviewWrapper; exports.FilePreviewWrapper = FilePreviewWrapper; exports.FileWidgetInput = FileWidgetInput; exports.ImagePreviewInfoLabel = ImagePreviewInfoLabel; exports.ImagePreviewWrapper = ImagePreviewWrapper; exports.Preview = Preview; exports.PreviewIcon = PreviewIcon; exports.PreviewInfo = PreviewInfo; exports.RemoveFileButton = RemoveFileButton; exports.Wrapper = Wrapper;