How to use the rax.PropTypes.array function in rax

To help you get started, we’ve selected a few rax 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 alibaba / rax / components / rax-picture / src / picture.web.js View on Github external
'contain',
      'cover',
      'stretch'
    ]),

    width: PropTypes.string, // width of picture
    height: PropTypes.string, // height of picture
    defaultHeight: PropTypes.string, // default height when the height setting fails

    autoRemoveScheme: PropTypes.bool,
    autoReplaceDomain: PropTypes.bool,
    autoScaling: PropTypes.bool,
    autoWebp: PropTypes.bool,
    autoCompress: PropTypes.bool,
    highQuality: PropTypes.bool,
    compressSuffix: PropTypes.array,

    lazyload: PropTypes.bool,
    placeholder: PropTypes.string,
    autoPixelRatio: PropTypes.bool,
    forceUpdate: PropTypes.bool,
    ignoreGif: PropTypes.bool
  };

  state = {
    visible: false
  };

  uri = '';

  newStyle = {};
github alibaba / rax / packages / rax-calendar / src / Calendar.js View on Github external
const DEVICE_WIDTH = 750;
const VIEW_INDEX = 2;

export default class Calendar extends Component {

  state = {
    currentMonthMoment: moment(this.props.selectedDate || this.props.startDate || this.props.endDate || this.props.today),
    selectedMoment: moment(this.props.selectedDate),
  };

  static propTypes = {
    customStyle: PropTypes.object,
    dayHeadings: PropTypes.array,
    eventDates: PropTypes.array,
    monthNames: PropTypes.array,
    nextButtonText: PropTypes.string,
    onDateSelect: PropTypes.func,
    onSwipeNext: PropTypes.func,
    onSwipePrev: PropTypes.func,
    onTouchNext: PropTypes.func,
    onTouchPrev: PropTypes.func,
    prevButtonText: PropTypes.string,
    scrollEnabled: PropTypes.bool,
    selectedDate: PropTypes.any,
    showControls: PropTypes.bool,
    startDate: PropTypes.any,
    endDate: PropTypes.any,
    titleFormat: PropTypes.string,
    dateFormat: PropTypes.string,
    today: PropTypes.any,
    weekStart: PropTypes.number,
github alibaba / rax / components / rax-calendar / src / index.js View on Github external
import moment from './moment';
import styles from './styles';

const DEVICE_WIDTH = 750;
const VIEW_INDEX = 2;

export default class Calendar extends Component {
  state = {
    currentMonthMoment: moment(this.props.selectedDate || this.props.startDate || this.props.endDate || this.props.today),
    selectedMoment: moment(this.props.selectedDate),
  };

  static propTypes = {
    customStyle: PropTypes.object,
    dayHeadings: PropTypes.array,
    eventDates: PropTypes.array,
    monthNames: PropTypes.array,
    nextButtonText: PropTypes.string,
    onDateSelect: PropTypes.func,
    onSwipeNext: PropTypes.func,
    onSwipePrev: PropTypes.func,
    onTouchNext: PropTypes.func,
    onTouchPrev: PropTypes.func,
    prevButtonText: PropTypes.string,
    selectedDate: PropTypes.any,
    showControls: PropTypes.bool,
    startDate: PropTypes.any,
    endDate: PropTypes.any,
    titleFormat: PropTypes.string,
    dateFormat: PropTypes.string,
    today: PropTypes.any,
    weekStart: PropTypes.number,
github alibaba / rax / packages / rax-calendar / src / Calendar.js View on Github external
import moment from 'moment/min/moment.min';
import styles from './styles';

const DEVICE_WIDTH = 750;
const VIEW_INDEX = 2;

export default class Calendar extends Component {

  state = {
    currentMonthMoment: moment(this.props.selectedDate || this.props.startDate || this.props.endDate || this.props.today),
    selectedMoment: moment(this.props.selectedDate),
  };

  static propTypes = {
    customStyle: PropTypes.object,
    dayHeadings: PropTypes.array,
    eventDates: PropTypes.array,
    monthNames: PropTypes.array,
    nextButtonText: PropTypes.string,
    onDateSelect: PropTypes.func,
    onSwipeNext: PropTypes.func,
    onSwipePrev: PropTypes.func,
    onTouchNext: PropTypes.func,
    onTouchPrev: PropTypes.func,
    prevButtonText: PropTypes.string,
    scrollEnabled: PropTypes.bool,
    selectedDate: PropTypes.any,
    showControls: PropTypes.bool,
    startDate: PropTypes.any,
    endDate: PropTypes.any,
    titleFormat: PropTypes.string,
    dateFormat: PropTypes.string,
github alibaba / rax / templates / template-retail / templates / default / pages / index / components / QuickEntry / index.js View on Github external
function getEntryItem(item = {}) {
  if (!item.appImg) return null;

  const appUrl = item.appUrl;
  return (
    
      
    
  );
}

QuickEntry.propTypes = {
  sourceData: PropTypes.array
};

QuickEntry.defaultProps = {
  sourceData: []
};

export default QuickEntry;
github alibaba / rax / components / rax-calendar / src / index.js View on Github external
import moment from './moment';
import styles from './styles';

const DEVICE_WIDTH = 750;
const VIEW_INDEX = 2;

export default class Calendar extends Component {
  state = {
    currentMonthMoment: moment(this.props.selectedDate || this.props.startDate || this.props.endDate || this.props.today),
    selectedMoment: moment(this.props.selectedDate),
  };

  static propTypes = {
    customStyle: PropTypes.object,
    dayHeadings: PropTypes.array,
    eventDates: PropTypes.array,
    monthNames: PropTypes.array,
    nextButtonText: PropTypes.string,
    onDateSelect: PropTypes.func,
    onSwipeNext: PropTypes.func,
    onSwipePrev: PropTypes.func,
    onTouchNext: PropTypes.func,
    onTouchPrev: PropTypes.func,
    prevButtonText: PropTypes.string,
    selectedDate: PropTypes.any,
    showControls: PropTypes.bool,
    startDate: PropTypes.any,
    endDate: PropTypes.any,
    titleFormat: PropTypes.string,
    dateFormat: PropTypes.string,
    today: PropTypes.any,
github alibaba / rax / packages / rax-charts / src / components / Def.js View on Github external
import {createElement, Component, PropTypes} from 'rax';

export default class Def extends Component {
  static type = 'def';

  static propTypes = {
    dim: PropTypes.string.isRequired,
    type: PropTypes.string,
    formatter: PropTypes.func,
    values: PropTypes.array,
    range: PropTypes.array,
    alias: PropTypes.string,
  };
}
github alibaba / rax / templates / template-retail / templates / default / pages / index / components / Redbag / index.js View on Github external
const dataSource = props.sourceData[0];
  if (!dataSource || !dataSource.appImg) {
    return null;
  }

  const appUrl = dataSource.appUrl;

  return (
    
      <img style="{style.image}">
    
  );
}

Redbag.propTypes = {
  sourceData: PropTypes.array
};

Redbag.defaultProps = {
  sourceData: []
};
github alibaba / rax / packages / rax-calendar / src / Calendar.js View on Github external
import styles from './styles';

const DEVICE_WIDTH = 750;
const VIEW_INDEX = 2;

export default class Calendar extends Component {

  state = {
    currentMonthMoment: moment(this.props.selectedDate || this.props.startDate || this.props.endDate || this.props.today),
    selectedMoment: moment(this.props.selectedDate),
  };

  static propTypes = {
    customStyle: PropTypes.object,
    dayHeadings: PropTypes.array,
    eventDates: PropTypes.array,
    monthNames: PropTypes.array,
    nextButtonText: PropTypes.string,
    onDateSelect: PropTypes.func,
    onSwipeNext: PropTypes.func,
    onSwipePrev: PropTypes.func,
    onTouchNext: PropTypes.func,
    onTouchPrev: PropTypes.func,
    prevButtonText: PropTypes.string,
    scrollEnabled: PropTypes.bool,
    selectedDate: PropTypes.any,
    showControls: PropTypes.bool,
    startDate: PropTypes.any,
    endDate: PropTypes.any,
    titleFormat: PropTypes.string,
    dateFormat: PropTypes.string,
    today: PropTypes.any,
github alibaba / rax / packages / rax-charts / src / components / Def.js View on Github external
import {createElement, Component, PropTypes} from 'rax';

export default class Def extends Component {
  static type = 'def';

  static propTypes = {
    dim: PropTypes.string.isRequired,
    type: PropTypes.string,
    formatter: PropTypes.func,
    values: PropTypes.array,
    range: PropTypes.array,
    alias: PropTypes.string,
  };
}