1.2.38 • Published 4 years ago

lit-modal v1.2.38

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

LitModal

<lit-modal></lit-modal> element expected to use as once instance per app.

Install

npm i lit-modal

Properties/Attributes

NameProp/AttrTypeDescription
openAttrBooleanOpen/close state
closeBtnTextAttrStringText of default close btn
useStandartCloseBtnAttrBooleanFlag of using default close btn

Styles

NameDefault
--dialog-overlaprgba(0,0,0,0.7)
--dialog-background#fefefe
--dialog-boxshadowrgba(0,0,0,0.7)
--dialog-header-background#111
--dialog-header-color#fefefe
--button-background#222
--button-background-hover#444
--button-bordernone
--button-color#fefefe
--button-padding5px 10px

Demo

HTML

<!DOCTYPE html>
<html>
    <body>
        <div id = 'app'></div>
        <script src = "demo.ts"></script>
    </body>
</html>

JS

import 'lit-modal';
import { html, render } from 'lit-html';

const header = html`Modal header`;
const content = html`Modal content`;
const footer = html`Modal footer`;

const modal = html`
    <lit-modal open 
               .header = "${header}"
               .content = "${content}"
               .footer = "${footer}"
    ></lit-modal>
`;
render(modal, document.getElementById('app'));
1.2.38

4 years ago

1.2.36

4 years ago

1.2.37

4 years ago

1.2.35

4 years ago

1.2.34

4 years ago

1.2.33

4 years ago

1.2.31

4 years ago

1.2.32

4 years ago

1.2.30

4 years ago

1.1.28

4 years ago

1.2.28

4 years ago

1.1.27

4 years ago

1.1.26

4 years ago

1.1.25

4 years ago

1.1.19

4 years ago

1.1.23

4 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.20

4 years ago

1.1.24

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.18

4 years ago

1.1.17

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.1

4 years ago

1.0.19

4 years ago

1.1.0

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.9

4 years ago

1.1.7

4 years ago

1.0.8

4 years ago

1.1.6

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago