Snippets Collections
@IBAction func eyeButtonPressed(_ sender: Any) {
        if passwordTextField.isSecureTextEntry == false {
            passwordTextField.isSecureTextEntry = true
            eyeImageView.image = UIImage(systemName: "eye.slash")
        } else {
            passwordTextField.isSecureTextEntry = false
            eyeImageView.image = UIImage(systemName: "eye")
        }
        eyeImageView.setImageColor(color: UIColor.gray)
    }
const selected = querySelector('selected');
  const prev =
    selected.previousElementSibling || this.modalImages.lastElementChild;
  selected.classList.remove('selected');
  prev.classList.add('selected');
import React, { useState } from 'react';

const Tour = ({ id, image, info, name, price, removeTour }) => {
  const [readMore, setReadMore] = useState(false);
  return (
    <article className="single-tour">
      <img src={image} alt={name} />
      <footer>
        <div className="tour-info">
          <h4>{name}</h4>
          <h4 className="tour-price">${price}</h4>
        </div>
        <p>
          {readMore ? info : `${info.substring(0, 200)}...`}
          <button onClick={() => setReadMore(!readMore)}>
            {readMore ? 'show less' : '  read more'}
          </button>
        </p>
        <button className="delete-btn" onClick={() => removeTour(id)}>
          not interested
        </button>
      </footer>
    </article>
  );
};

export default Tour;
star

Wed Jul 05 2023 05:32:27 GMT+0000 (Coordinated Universal Time)

#ios #swift #eye #password #hide #show
star

Sun Oct 30 2022 23:09:44 GMT+0000 (Coordinated Universal Time)

#react #show #hide #substring #paragraph #content
star

Fri Oct 21 2022 05:24:35 GMT+0000 (Coordinated Universal Time) https://www.educative.io/module/page/LgoqGKFl7YxO2wNDm/10370001/4636226247720960/5293242192494592

#git #show #stash
star

Sun Oct 16 2022 05:13:57 GMT+0000 (Coordinated Universal Time)

#react #show #hide #substring #paragraph #content

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension