1.0.8 • Published 3 years ago

custom-modal-web-component v1.0.8

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

Custom modal

Bachelor thesis project.

Technology

Project created based on Web Components

  • HTML
  • CSS
  • JavaScript
  • Webpack

NPM package

Link to package

Usage in project

Install the package from NPM

$ npm i custom-modal-web-component

Use as a tag in your project

<custom-modal title='My modal'>
    <div slot='content'>Modal content as a slot</div>
</custom-modal>

Parameters

NameTypeDescriptionMandatoryDefault
titleStringAvailable values allYes-
openBooleanModal visible if value trueNofalse
buttonStringText for button in modal footer, if no button attribute - button invisibleNoSend
sizeStringAvailable values m / l / xlNom

Available events

btn-click - event triggered when footer button clicked.

close - event triggered when closed the modal (X button clicked).

Development

Install the dependencies and devDependencies and start the server.

$ npm install

Build the development version.

$ npm run dev

Build the production version.

$ npm run build

Run webpack server and watch the changes.

$ npm run serve
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago