1.2.38 • Published 3 years ago

lit-modal v1.2.38

Weekly downloads
-
License
MIT
Repository
-
Last release
3 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

3 years ago

1.2.36

3 years ago

1.2.37

3 years ago

1.2.35

3 years ago

1.2.34

3 years ago

1.2.33

3 years ago

1.2.31

3 years ago

1.2.32

3 years ago

1.2.30

3 years ago

1.1.28

3 years ago

1.2.28

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.19

3 years ago

1.1.23

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.20

3 years ago

1.1.24

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.1

3 years ago

1.0.19

3 years ago

1.1.0

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.1.7

3 years ago

1.0.8

3 years ago

1.1.6

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago