How to use the react-view.PropTypes.String function in react-view

To help you get started, we’ve selected a few react-view 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 uber / baseweb / documentation-site / components / yard / config / timepicker.ts View on Github external
description: `Set to true to allow times that aren't displayed in the options list to be entered manually. Defaults to false.`,
    },
    nullable: {
      value: undefined,
      type: PropTypes.Boolean,
      description: `Set to true to allow the timepicker to have an undefined value. Defaults to false.`,
    },
    placeholder: {
      value: undefined,
      type: PropTypes.String,
      description: `If the value is undefined, the placeholder is shown. Defaults to HH:mm.`,
    },
    disabled: inputConfig.props.disabled,
    format: {
      value: undefined,
      type: PropTypes.String,
      placeholder: '12',
      description:
        '12 or 24. Render options in AM/PM format or 24 hour format. Defaults to 12 hour.',
    },
    step: {
      value: undefined,
      type: PropTypes.Number,
      placeholder: '900',
      description:
        'Amount of seconds between each option time. Defaults to 900 (15 minutes).',
    },
    error: inputConfig.props.error,
    positive: inputConfig.props.positive,
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
github uber / baseweb / documentation-site / components / yard / knob.tsx View on Github external
<label>{name}</label>
          
            React Ref documentation
          
          
        
      );
    case PropTypes.String:
    case PropTypes.Date:
    case PropTypes.Number:
      return (
        
          <label>{name}</label>
          <input> set((event.target as HTMLInputElement).value)}
            placeholder={placeholder}
            size="compact"
            value={val ? String(val) : undefined}
          /&gt;
          
        
      );
    case PropTypes.Boolean:
github uber / baseweb / documentation-site / components / yard / config / datepicker.ts View on Github external
},
    excludeDates: {
      value: undefined,
      type: PropTypes.Array,
      description: 'A list of dates to disable. Array',
      hidden: true,
    },
    quickSelect: {
      value: undefined,
      type: PropTypes.Boolean,
      description:
        'Display select for quickly choosing date ranges. range must be true as well.',
    },
    formatString: {
      value: undefined,
      type: PropTypes.String,
      description: 'String format passed to date-fns.',
      placeholder: 'yyyy/MM/dd',
      hidden: true,
    },
    mask: {
      value: undefined,
      type: PropTypes.String,
      description: 'Mask used for the text input. Passed to react-input-mask.',
      placeholder: '9999/99/99',
      hidden: true,
    },
    quickSelectOptions: {
      value: undefined,
      type: PropTypes.Array,
      description:
        'Array of custom options (Array&lt;{ id: string; beginDate: Date }&gt;) displayed in the quick select. Overrides default options if provided.',
github uber / baseweb / documentation-site / components / yard / config / table.ts View on Github external
columns: {
      value: `['Name', 'Age', 'Address']`,
      type: PropTypes.Array,
      description: 'Table columns. Data passed to each header cell.',
    },
    data: {
      value: `[
  ['Sarah Brown', 31, '100 Broadway st. New York City, New York'],
  ['Jane Smith', 32, '100 Market st. San Francisco, California'],
]`,
      type: PropTypes.Array,
      description: 'Table rows. Data passed to each row and cell',
    },
    horizontalScrollWidth: {
      value: undefined,
      type: PropTypes.String,
      description: 'Table width fills this provided value.',
    },
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
      description: 'Lets you customize all aspects of the component.',
      custom: {
        names: [],
        sharedProps: {},
      },
    },
  },
  mapTokensToProps: {
    Table: tableProps,
  },
};
github uber / baseweb / documentation-site / components / yard / config / link.ts View on Github external
imports: {
    'baseui/link': {
      named: ['StyledLink'],
    },
  },
  scope: {StyledLink},
  theme: ['linkText', 'linkVisited', 'linkHover', 'linkActive'],
  props: {
    children: {
      value: 'Link to Base Web',
      type: PropTypes.ReactNode,
      description: `Link's content.`,
    },
    href: {
      value: 'https://baseweb.design',
      type: PropTypes.String,
      description: 'The URL that the hyperlink points to.',
    },
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
      description: 'Lets you customize all aspects of the component.',
      custom: {
        names: [],
        sharedProps: {},
      },
    },
  },
};

export default LinkConfig;
github uber / baseweb / documentation-site / components / yard / config / phone-input.ts View on Github external
description: 'Renders component in provided size.',
      imports: {
        'baseui/phone-input': {
          named: ['SIZE'],
        },
      },
    },
    maxDropdownHeight: {
      value: undefined,
      type: PropTypes.String,
      description: 'Sets the max height of the country select dropdown.',
      hidden: true,
    },
    maxDropdownWidth: {
      value: undefined,
      type: PropTypes.String,
      description: 'Sets the max width of the country select dropdown.',
      hidden: true,
    },
    mapIsoToLabel: {
      value: undefined,
      type: PropTypes.Function,
      description:
        'Function for mapping ISO codes to country names. Useful for localization of the country select dropdown.',
      hidden: true,
    },
    id: {
      value: undefined,
      type: PropTypes.String,
      description:
        "Id attribute value to be added to the input element and as a label's for attribute value.",
      hidden: true,
github uber / baseweb / documentation-site / components / yard / config / card.ts View on Github external
description: `An array of Tab components.`,
      imports: {
        'baseui/card': {named: ['StyledBody', 'StyledAction']},
        'baseui/button': {named: ['Button']},
      },
    },
    title: {
      value: undefined,
      placeholder: 'I am a card',
      type: PropTypes.String,
      description: 'Title to be displayed in the card.',
    },
    headerImage: {
      value: undefined,
      placeholder: 'https://source.unsplash.com/user/erondu/700x400',
      type: PropTypes.String,
      description: 'Image to be displayed in the card.',
    },
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
      description: 'Lets you customize all aspects of the component.',
      custom: {
        names: [
          'Action',
          'Body',
          'Contents',
          'HeaderImage',
          'Root',
          'Thumbnail',
          'Title',
          'Wrapper',
github uber / baseweb / documentation-site / components / yard / config / radio.ts View on Github external
'tickFillErrorHover',
    'tickFillErrorHoverActive',
    'tickFillErrorSelected',
    'tickFillErrorSelectedHover',
    'tickFillErrorSelectedHoverActive',
    'tickFillDisabled',
    'tickBorder',
    'tickBorderError',
    'tickMarkFill',
    'tickMarkFillError',
    'tickMarkFillDisabled',
  ],
  props: {
    value: {
      value: '2',
      type: PropTypes.String,
      description: 'Passed to the input element value attribute',
      stateful: true,
    },
    onChange: {
      value: 'e =&gt; setValue(e.target.value)',
      type: PropTypes.Function,
      description: 'Handler for change events on trigger element.',
      propHook: {
        what: 'e.target.value',
        into: 'value',
      },
    },
    children: {
      value: `One
github uber / baseweb / documentation-site / components / yard / config / side-nav.ts View on Github external
imports: {
    'baseui/side-navigation': {
      named: ['Navigation'],
    },
  },
  scope: {Navigation},
  theme: [],
  props: {
    items: {
      value: items,
      type: PropTypes.Array,
      description: 'Navigation items to render.',
    },
    activeItemId: {
      value: '#primary',
      type: PropTypes.String,
      description: 'Currently selected item id.',
      stateful: true,
    },
    onChange: {
      value: '({item}) => setActiveItemId(item.itemId)',
      type: PropTypes.Function,
      description: 'Called when item is clicked.',
      propHook: {
        what: 'item.itemId',
        into: 'activeItemId',
      },
    },
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
      description: 'Lets you customize all aspects of the component.',
github uber / baseweb / documentation-site / components / yard / config / icon.ts View on Github external
theme: [],
  props: {
    size: {
      value: 64,
      type: PropTypes.Number,
      description:
        'Size of element, will be passed to the svg width/height style. Can also be a value included in.',
    },
    color: {
      value: undefined,
      type: PropTypes.String,
      description: 'Color of icon, will be used as svg fill.',
    },
    title: {
      value: undefined,
      type: PropTypes.String,
      description:
        'Allows you to set the SVG <title> label, which is used for accessibility.',
    },
    overrides: {
      value: undefined,
      type: PropTypes.Custom,
      description: 'Lets you customize all aspects of the component.',
      custom: {
        names: ['Svg'],
        sharedProps: {
          $size: 'size',
          $color: 'color',
        },
      },
    },
  },</title>