Miss any of our Open RFC calls?Watch the recordings here! »

hamadashadow

8.8.0 • Public • Published

hamadaShadow

What is this?

Get perfect Hamada shadow every time form the non-disigner developer.

Installation

npm i hamadaShadow --save

How to use?

import { hamadaShadow } from "hamadaShadow";
 
hamadaShadow({
  shadow_type: "soft",
  padding: false,
});

Options

hamadaShadow support 2 options:

  • shadow_type - hard | soft ( By default to soft)
  • padding - boolean (By default to false)

Source Code

function hamadaShadow(options) {
  let element = document.querySelectorAll(".hamadaShadow");
 
  if (options.shadow_type === "hard") options.shadow_type = "0px";
  else options.shadow_type = "15px";
 
  element.forEach((e) => {
    e.style.boxShadow = `10px 10px ${options.shadow_type} 1px rgb(0,0,0,0.12)`;
    if (options.padding) {
      e.style.padding = "1rem";
    }
  });
}

Install

npm i hamadashadow

DownloadsWeekly Downloads

0

Version

8.8.0

License

ISC

Unpacked Size

1.94 kB

Total Files

3

Last publish

Collaborators

  • avatar