How to use the netlify-cms-ui-default.borders.textField function in netlify-cms-ui-default

To help you get started, we’ve selected a few netlify-cms-ui-default 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 netlify / netlify-cms / packages / netlify-cms-core / src / components / MediaLibrary / MediaLibraryCard.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled';
import { colors, borders, lengths, shadows, effects } from 'netlify-cms-ui-default';

const IMAGE_HEIGHT = 160;

const Card = styled.div`
  width: ${props => props.width};
  height: 240px;
  margin: ${props => props.margin};
  border: ${borders.textField};
  border-color: ${props => props.isSelected && colors.active};
  border-radius: ${lengths.borderRadius};
  cursor: pointer;
  overflow: hidden;
  background-color: ${props => props.isPrivate && colors.textFieldBorder};

  &:focus {
    outline: none;
  }
`;

const CardImageWrapper = styled.div`
  height: ${IMAGE_HEIGHT + 2}px;
  ${effects.checkerboard};
  ${shadows.inset};
  border-bottom: solid ${lengths.borderWidth} ${colors.textFieldBorder};
github netlify / netlify-cms / packages / netlify-cms-core / src / components / Editor / EditorControlPane / EditorControl.js View on Github external
removeMediaControl,
} from 'Actions/mediaLibrary';
import Widget from './Widget';

/**
 * This is a necessary bridge as we are still passing classnames to widgets
 * for styling. Once that changes we can stop storing raw style strings like
 * this.
 */
const styleStrings = {
  widget: `
    display: block;
    width: 100%;
    padding: ${lengths.inputPadding};
    margin: 0;
    border: ${borders.textField};
    border-radius: ${lengths.borderRadius};
    border-top-left-radius: 0;
    outline: 0;
    box-shadow: none;
    background-color: ${colors.inputBackground};
    color: #444a57;
    transition: border-color ${transitions.main};
    position: relative;
    font-size: 15px;
    line-height: 1.5;

    select& {
      text-indent: 14px;
      height: 58px;
    }
  `,
github netlify / netlify-cms / packages / netlify-cms-widget-file / src / withFileControl.js View on Github external
buttons,
  borders,
  effects,
  shadows,
  Asset,
} from 'netlify-cms-ui-default';

const MAX_DISPLAY_LENGTH = 50;

const ImageWrapper = styled.div`
  flex-basis: 155px;
  width: 155px;
  height: 100px;
  margin-right: 20px;
  margin-bottom: 20px;
  border: ${borders.textField};
  border-radius: ${lengths.borderRadius};
  ${effects.checkerboard};
  ${shadows.inset};
`;

const Image = styled(({ value: src }) =&gt; <img role="presentation" src="{src">)`
  width: 100%;
  height: 100%;
  object-fit: contain;
`;

const ImageAsset = ({ getAsset, value }) =&gt; {
  return ;
};

const MultiImageWrapper = styled.div`