Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / components / molecules / Calendar / styled.js
Size: Mime:
"use strict";

var __importDefault = this && this.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};

Object.defineProperty(exports, "__esModule", {
  value: true
});

const react_1 = __importDefault(require("react"));

const styleh_components_1 = require("styleh-components"); // import Calendar from 'react-calendar'


const Text_1 = require("../../atoms/Text");

const Calendar = props => react_1.default.createElement("div", Object.assign({}, props), "fixme");

const calendarAlignment = item => {
  switch (item) {
    case 'tl':
    case 'lt':
      return 'bottom: 100%; left: 0;';

    case 'tr':
    case 'rt':
      return 'bottom: 100%; right: 0;';

    case 'rb':
    case 'br':
      return 'top: 100%; right: 0;';

    case 'bl':
    case 'lb':
    default:
      return 'top: 100%; left: 0;';
  }
};

const PickerLabel = styleh_components_1.styled.withComponent(Text_1.Label)`
  text-transform: capitalize;
  cursor: pointer;
  color: blue;
`;
exports.PickerLabel = PickerLabel;
const DatePickerLabel = styleh_components_1.styled.withComponent(Text_1.Label)``;
exports.DatePickerLabel = DatePickerLabel;
const StyledCalendar = styleh_components_1.styled.withComponent(Calendar)`
  display: ${props => props.isShowCalendar ? 'block' : 'none'}

  ${props => props.align && styleh_components_1.styled.css`
      position: absolute;
      z-index: 9;
    `}
  ${props => props.align && calendarAlignment(props.align)};
`;
exports.StyledCalendar = StyledCalendar;
const Wrapper = styleh_components_1.styled.section`
  position: relative;
`;
exports.Wrapper = Wrapper; //# sourceMappingURL=styled.js.map