Skip to content

Latest commit

 

History

History
52 lines (44 loc) · 1.97 KB

README.md

File metadata and controls

52 lines (44 loc) · 1.97 KB

Table of Contents

Dev Notes

  • styling done with mostly .css with partial done inline to implement themeColor generated from colorMe() custom hex color generator
  • loading state represented by a loading svg [1]
  • utils folder addition
  • getPatternFromRegEx function in customValidation.js to extract pattern which can be used in pattern attribute of input element

Learnings

  • pattern attribute for validating input value
    <input
      type="text"
      name="firstName"
      id="firstName"
      ref={firstName}
      pattern={nameRegEx}
      required
    />
  • naming an imported image asset
import loader from '../assets/bean_eater_animated.svg'

const loadingStyle = {
  height: rem(360),
  width: '100%',
  backgroundImage: `url(${loader})`,
  backgroundRepeat: 'no-repeat',
  backgroundSize: 'contain',
  backgroundPosition: 'center',
}

Third Party Resources