How to use the @lskjs/utils/isTouchDevice function in @lskjs/utils

To help you get started, we’ve selected a few @lskjs/utils 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 lskjs / ux / packages / list / src / ListFilter.jsx View on Github external
render() {
    const {
      List,
      FilterForm,
      listStore,
      debug,
      filterProps,
      isFilterModal,
      // container,
    } = this.props;
    if (!FilterForm) return null; // ;
    const { showFilter } = listStore;
    return (
      
        
          
        
        <div>
          
            
              </div>
github lskjs / ux / packages / list / src / ListFilter.jsx View on Github external
isFilterModal,
      // container,
    } = this.props;
    if (!FilterForm) return null; // ;
    const { showFilter } = listStore;
    return (
      
        
          
        
        <div>
          
            
              
              
                
              
            </div>
github lskjs / ux / packages / modal / src / Modal2.jsx View on Github external
componentDidMount() {
    // TODO: Hack. Убрать когда-нибудь
    /* eslint-disable */
    if (isTouchDevice()) {
      setInterval(() => {
        this.setState({ counter: this.state.counter + 1 });
      }, 500);
    }
    /* eslint-enable */
  }
github lskjs / ux / packages / button / src / Button.jsx View on Github external
iconLeft: null,
    iconRight: null,
    children: null,
    state: null,
    contentSuccess: null,
    contentProcessing: null,
    contentError: null,
    textSuccess: null,
    textProcessing: null,
    textError: null,
    autoMobile: false,
    rounded: false,
    colors: null,
    mobileView: false,
    onlyIcon: false,
    isRipple: !isTouchDevice(),
  }

  constructor(props) {
    super(props);
    this.state = {
      isRippleActive: false,
    };
    this.ripple = React.createRef();
  }

  componentDidMount() {
    const { disabled, isRipple } = this.props;
    if (typeof window !== 'undefined') {
      if (!disabled && isRipple) {
        const condition = this.isBrowser('safari') || this.isBrowser('firefox');
        this.ripple.current.addEventListener(condition ? 'click' : 'mousedown', this.clickListener);