How to use merge-class-names - 10 common examples

To help you get started, we’ve selected a few merge-class-names 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 wojtekmaj / react-datetime-picker / src / DateTimePicker.jsx View on Github external
clockClassName,
      className: dateTimePickerClassName, // Unused, here to exclude it from clockProps
      maxDetail,
      onChange,
      value,
      ...clockProps
    } = this.props;

    const className = `${baseClassName}__clock`;
    const [valueFrom] = [].concat(value);

    const maxDetailIndex = allViews.indexOf(maxDetail);

    return (
      
        <div>
           0}
            renderSecondHand={maxDetailIndex &gt; 1}
            value={valueFrom}
            {...clockProps}
          /&gt;
        </div>
      
    );
  }
github wojtekmaj / react-timerange-picker / src / TimeRangePicker.jsx View on Github external
clockClassName,
      className: timeRangePickerClassName, // Unused, here to exclude it from clockProps
      maxDetail,
      onChange,
      value,
      ...clockProps
    } = this.props;

    const className = `${baseClassName}__clock`;
    const [valueFrom] = [].concat(value);

    const maxDetailIndex = allViews.indexOf(maxDetail);

    return (
      
        <div>
           0}
            renderSecondHand={maxDetailIndex &gt; 1}
            value={valueFrom}
            {...clockProps}
          /&gt;
        </div>
      
    );
  }
github wojtekmaj / react-time-picker / src / TimePicker.jsx View on Github external
clockClassName,
      className: timePickerClassName, // Unused, here to exclude it from clockProps
      maxDetail,
      onChange,
      value,
      ...clockProps
    } = this.props;

    const className = `${baseClassName}__clock`;
    const [valueFrom] = [].concat(value);

    const maxDetailIndex = allViews.indexOf(maxDetail);

    return (
      
        <div>
           0}
            renderSecondHand={maxDetailIndex &gt; 1}
            value={valueFrom}
            {...clockProps}
          /&gt;
        </div>
      
    );
  }
github wojtekmaj / react-datetime-picker / src / DateTimePicker.jsx View on Github external
}

    const {
      calendarClassName,
      className: dateTimePickerClassName, // Unused, here to exclude it from calendarProps
      maxDetail: dateTimePickerMaxDetail, // Unused, here to exclude it from calendarProps
      onChange,
      value,
      ...calendarProps
    } = this.props;

    const className = `${baseClassName}__calendar`;

    return (
      
        <div>
          
        </div>
      
    );
  }
github wojtekmaj / react-date-picker / src / DateInput / MonthSelect.jsx View on Github external
placeholder = '--',
  short,
  value,
  year,
  ...otherProps
}) {
  const maxMonth = min(12, maxDate &amp;&amp; year === getYear(maxDate) &amp;&amp; getMonthHuman(maxDate));
  const minMonth = max(1, minDate &amp;&amp; year === getYear(minDate) &amp;&amp; getMonthHuman(minDate));
  const dates = [...Array(12)].map((el, index) =&gt; new Date(2019, index, 1));
  const name = 'month';
  const formatter = short ? formatShortMonth : formatMonth;

  return (
    <select name="{name}" aria-label="{ariaLabel}"> {
        if (itemRef) {
          itemRef(ref, name);
        }
      }}
      value={value !== null ? value : ''}
      {...otherProps}
    &gt;
      {!value &amp;&amp; (
        <option value="">
          {placeholder}
        </option></select>
github wojtekmaj / react-daterange-picker / src / DateRangePicker.jsx View on Github external
render() {
    const { className, disabled } = this.props;
    const { isOpen } = this.state;

    return (
      <div> {
          if (!ref) {
            return;
          }

          this.wrapper = ref;
        }}
      &gt;
        {this.renderInputs()}</div>
github wojtekmaj / react-date-picker / src / DatePicker.jsx View on Github external
render() {
    const { className, disabled } = this.props;
    const { isOpen } = this.state;

    return (
      <div> {
          if (!ref) {
            return;
          }

          this.wrapper = ref;
        }}
      &gt;
        {this.renderInputs()}</div>
github wojtekmaj / react-lifecycle-methods-diagram / src / diagramElements / Section.jsx View on Github external
);
  }

  const gridColumn = `${col + 1} / span ${colspan}`;

  return (
    &lt;&gt;
      <section span="" style="{{">
      <div span="" style="{{">
      <h3 style="{{">
        
          {name}
        
      </h3></div></section>
github wojtekmaj / react-datetime-picker / src / DateTimePicker.jsx View on Github external
render() {
    const { className, disabled } = this.props;
    const { isCalendarOpen, isClockOpen } = this.state;

    return (
      <div> {
          if (!ref) {
            return;
          }

          this.wrapper = ref;
        }}
      &gt;
        {this.renderInputs()}</div>
github wojtekmaj / react-calendar / src / Tile.jsx View on Github external
locale,
      maxDate,
      maxDateTransform,
      minDate,
      minDateTransform,
      onClick,
      onMouseOver,
      style,
      tileDisabled,
      view,
    } = this.props;
    const { tileClassName, tileContent } = this.state;

    return (
      <button disabled="{"> date)
          || (maxDate &amp;&amp; maxDateTransform(maxDate) &lt; date)
          || (tileDisabled &amp;&amp; tileDisabled({ activeStartDate, date, view }))
        }
        onClick={onClick &amp;&amp; (event =&gt; onClick(date, event))}
        onFocus={onMouseOver &amp;&amp; (() =&gt; onMouseOver(date))}
        onMouseOver={onMouseOver &amp;&amp; (() =&gt; onMouseOver(date))}
        style={style}
        type="button"
      &gt;
        {formatAbbr
          ? (
            <abbr aria-label="{formatAbbr(locale,">
              {children}
            </abbr></button>

merge-class-names

A function that merges given class names, no matter their format: string with single or multiple class names or an array of class names. Filters out invalid class names as well.

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular merge-class-names functions