How to use the react-with-styles.css function in react-with-styles

To help you get started, we’ve selected a few react-with-styles 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 airbnb / react-dates / src / components / SingleDatePicker.jsx View on Github external
} = this.props;
    const { dayPickerContainerStyles, isDayPickerFocused, showKeyboardShortcuts } = this.state;

    const onOutsideClick = (!withFullScreenPortal && withPortal) ? this.onOutsideClick : undefined;
    const closeIcon = customCloseIcon || ();

    const inputHeight = getInputHeight(reactDates, small);

    const withAnyPortal = withPortal || withFullScreenPortal;

    /* eslint-disable jsx-a11y/no-static-element-interactions */
    /* eslint-disable jsx-a11y/click-events-have-key-events */
    return (
github airbnb / react-dates / src / components / DateRangePicker.jsx View on Github external
showKeyboardShortcuts={showKeyboardShortcuts}
          onBlur={this.onDayPickerBlur}
          phrases={phrases}
          dayAriaLabelFormat={dayAriaLabelFormat}
          isRTL={isRTL}
          firstDayOfWeek={firstDayOfWeek}
          weekDayFormat={weekDayFormat}
          verticalHeight={verticalHeight}
          transitionDuration={transitionDuration}
          disabled={disabled}
          horizontalMonthPadding={horizontalMonthPadding}
        />

        {withFullScreenPortal && (
          <button aria-label="{phrases.closeDatePicker}" type="button">
            {closeIcon}
          </button>
        )}
      
    );
    /* eslint-enable jsx-a11y/no-static-element-interactions */
    /* eslint-enable jsx-a11y/click-events-have-key-events */
  }
github airbnb / react-dates / src / components / DateRangePicker.jsx View on Github external
);

    const closeIcon = customCloseIcon || (
      
    );

    const inputHeight = getInputHeight(reactDates, small);

    const withAnyPortal = withPortal || withFullScreenPortal;

    /* eslint-disable jsx-a11y/no-static-element-interactions */
    /* eslint-disable jsx-a11y/click-events-have-key-events */
    return (
github airbnb / react-dates / src / components / KeyboardShortcutRow.jsx View on Github external
function KeyboardShortcutRow({
  unicode,
  label,
  action,
  block,
  styles,
}) {
  return (
    <li>
      <div>
        <span action="" aria-label="{`${label},`}" role="img">
          {unicode}</span></div></li>
github airbnb / react-dates / src / components / DayPickerKeyboardShortcuts.jsx View on Github external
type="button"
          aria-label={toggleButtonText}
          onClick={this.onShowKeyboardShortcutsButtonClick}
          onKeyDown={(e) =&gt; {
            if (e.key === 'Enter') {
              e.preventDefault();
            } else if (e.key === 'Space') {
              this.onShowKeyboardShortcutsButtonClick(e);
            }
          }}
          onMouseUp={(e) =&gt; {
            e.currentTarget.blur();
          }}
        &gt;
          <span>
            ?
          </span>
        

        {showKeyboardShortcutsPanel &amp;&amp;
github airbnb / react-dates / src / components / DropDownController.jsx View on Github external
const inputEl = Input &amp;&amp; (
      <input>
    );

    return (
      <div>
        {enableOutsideClick &amp;&amp; (
          
            {inputEl}
            {this.maybeRenderDayPickerWithPortal()}
          
        )}
        {!enableOutsideClick &amp;&amp; inputEl}
        {!enableOutsideClick &amp;&amp; this.maybeRenderDayPickerWithPortal()}
      </div>
    );
  }
}
github airbnb / react-dates / src / components / SingleDatePickerContainer.jsx View on Github external
regular,
      verticalSpacing,
      styles,
    } = this.props;

    const { isInputFocused } = this.state;

    const displayValue = this.getDateString(date);

    const onOutsideClick = (!withPortal &amp;&amp; !withFullScreenPortal) ? this.onClearFocus : undefined;

    const hideFang = verticalSpacing &lt; FANG_HEIGHT_PX;

    return (
      <div>
        
          </div>
github airbnb / react-dates / src / components / DropDownController.jsx View on Github external
)}

        {withFullScreenPortal &amp;&amp; (
          <button type="button" aria-label="{(phrases">
            <div>
              {closeIcon}
            </div>
          </button>
        )}
      
    );
  }
github airbnb / react-dates / src / components / DayPickerKeyboardShortcuts.jsx View on Github external
ref={this.setHideKeyboardShortcutsButtonRef}
              {...css(
                styles.DayPickerKeyboardShortcuts_buttonReset,
                styles.DayPickerKeyboardShortcuts_close,
              )}
              type="button"
              tabIndex="0"
              aria-label={phrases.hideKeyboardShortcutsPanel}
              onClick={closeKeyboardShortcutsPanel}
              onKeyDown={this.onKeyDown}
            &gt;
              
            

            <ul id="DayPickerKeyboardShortcuts_description">
              {this.keyboardShortcuts.map(({ unicode, label, action }) =&gt; (
                
              ))}
            </ul>
          
        }
      
    );
github airbnb / react-dates / src / components / DayPicker.jsx View on Github external
{renderWeekHeaderElement ? renderWeekHeaderElement(day) : <small>{day}</small>}
      
    ));

    return (
      <div>
        <ul>
          {header}
        </ul>
      </div>
    );
  }

react-with-styles

[![Build Status][travis-svg]][travis-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis