Skip to content

Instantly share code, notes, and snippets.

View rtm7777's full-sized avatar

Nikolai rtm7777

  • Ukraine, Cherkassy
View GitHub Profile
@rtm7777
rtm7777 / PasswordField.js
Created February 10, 2021 10:11
Formik Password input with disabled autocomplete
import {
useCallback,
useEffect,
useRef,
useState,
} from 'react'
import PropTypes from 'prop-types'
import clsx from 'clsx'
import { useField, ErrorMessage } from 'formik'
@rtm7777
rtm7777 / Divider.js
Created February 5, 2018 15:33
simple vertical react divider component
import React, { Component } from 'react'
const Left = () => <div /> // Component to be placed into left section of divider
const Right = () => <div /> // Component to be placed into right section of divider
class Divider extends Component {
constructor(props) {
super(props)
this.dragging = false
this.leftLim = 0.1 // min width of left container (0.1...0.9)