4.5.10 • Published 1 year ago

@forter/modal v4.5.10

Weekly downloads
127
License
Apache-2.0
Repository
github
Last release
1 year ago

fc-modal

A Container element for showing up a popup for different use cases.

Usage

<fc-modal>
   <fc-button slot="toggle" icon="forter" tooltip="Click to Open!"></fc-button>
   Hello, this is the modal content.
</fc-modal>

Examples

<!-- alert -->

<fc-modal demo-opened width="400px" height="220px">
  <fc-button slot="toggle" label="Click to Toggle Modal" icon="forter">
  </fc-button>
  <h1>Ch-ch-ch-changes.. ♪</h1>
  <p>The Forter Decision Dashboard has some updates for you!</p>
  <p>Please refresh your browser window now.</p>
  <fc-layout>
   <fc-button intent="apply" data-reason="apply" onClick="location.reload()">
      Refresh Time!
    </fc-button>
   </fc-layout>
</fc-modal>

<!-- dataEntry -->

<fc-modal demo-opened  height="400px" width="600px">
   <style>
      .item span {
        color: var(--fc-gray-600);
        font-size: 12px;
      }
   </style>
   <fc-button slot="toggle" label="Click to Toggle Modal" icon="forter"></fc-button>
   <h1>Add New User</h1>
   <fc-layout id="modal-content" rows="2" columns="2" gap="10px" flowColumns>
     <fc-layout flowColumns class="item">
       <span>First Name</span>
       <fc-input></fc-input>
     </fc-layout>

     <fc-layout flowColumns class="item">
       <span>Last Name</span>
       <fc-input></fc-input>
     </fc-layout>

     <fc-layout flowColumns class="item">
       <span>Email</span>
       <fc-input type="email"></fc-input>
     </fc-layout>

     <fc-layout flowColumns id="role" class="item">
       <span>Role</span>
       <fc-dropdown triggerLabel="trigger me">
  <fc-dropdown-item>User</fc-dropdown-item>icon
  <fc-dropdown-item>Support</fc-dropdown-item>
  <fc-dropdown-item>Admin</fc-dropdown-item>
       </fc-dropdown>
     </div>
   </fc-layout>

   <span column-start="1" column-end="3"> User Access </span>

   <fc-radio-group column-start="1" column-end="3">
        <fc-radio checked label="Allow user to access all related sites" value="all-sites-access"></fc-radio>
        <fc-radio label="Specify sites for user to access (at least 1 site)" value="specific-sites-access"></fc-radio>
   </fc-radio-group>

   <fc-button intent="cancel">Cancel</fc-button>
   <fc-button intent="apply">Apply</fc-button>

  </fc-layout>
</fc-modal>

<!-- areYouSure -->

<fc-modal demo-opened height="200px" width="300px">
   <fc-button slot="toggle">show modal</fc-button>
   <h1>discard this claim?</h1>
   <p>
   this is a multi line description text discard the claim lorem ipsum.
   </p>
   <fc-layout flowColumns columns=2>
   <fc-button intent="cancel" slot="cancel-button" data-reason="dismissed">
     dismissed
   </fc-button>
   <fc-button intent="apply" slot="accept-button" data-reason="apply">
     apply!
   </fc-button>
   </fc-layout>
</fc-modal>

Properties

PropertyAttributeTypeDefaultDescription
backgroundany
buttonSlotsany
heightheightstringHeight of the modal
nonCloseablenon-closeablebooleanfalseWhether the user is able to close the modal.In some specific, rare cases ( e.g. a refresh modal)the user should not be able to close the modaluntil the desired action is performed.
openedopenedbooleanfalseWhether the modal is open
stateany
toggleSlotany
widthwidthstringWidth of the modal

Events

Event
opened-changed

Slots

NameDescription
modal content
toggletoggle button

CSS Custom Properties

PropertyDescription
--fc-modal-backgroundmodal's background. default: var(--fc-gray-100)
--fc-modal-border-radiusmodal's border radius. default: 6px
--fc-modal-box-shadowmodal's drop-shadow. default: none
--fc-modal-heightmodal's height. default: 636px
--fc-modal-overflowmodal's content overflow. default: auto
--fc-modal-paddingmodal's padding. default: 20px 40px
--fc-modal-widthmodal's width. default: 636px
--fc-modal-z-indexmodal's z-index. default: 3
4.5.8

1 year ago

4.5.7

1 year ago

4.5.9

1 year ago

4.5.6

1 year ago

4.5.5

1 year ago

4.5.10

1 year ago

4.5.4

1 year ago

4.5.3

1 year ago

4.5.2

1 year ago

4.5.1

1 year ago

4.4.0

2 years ago

4.5.0

2 years ago

4.3.9

2 years ago

4.3.11

2 years ago

4.3.10

2 years ago

4.3.8

2 years ago

4.3.7

2 years ago

4.3.6

2 years ago

4.3.5

3 years ago

4.3.4

3 years ago

4.3.3

3 years ago

4.3.2

3 years ago

4.3.1

4 years ago

4.2.11

4 years ago

4.3.0

4 years ago

4.2.10

4 years ago

4.2.9

4 years ago

4.2.8

4 years ago

4.2.7

4 years ago

4.2.6

4 years ago

4.2.5

4 years ago

4.2.4

4 years ago

4.2.3

4 years ago

4.2.2

4 years ago

4.2.1

4 years ago

4.2.0

4 years ago

4.1.12

4 years ago

4.1.11

4 years ago

4.1.10

4 years ago

4.1.8

4 years ago

4.1.9

4 years ago

4.1.7

4 years ago

4.1.6

4 years ago

4.1.5

4 years ago

4.1.4

4 years ago

4.1.3

4 years ago

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.4.5

4 years ago

3.4.4

4 years ago

3.4.3

5 years ago

3.4.2

5 years ago

3.4.1

5 years ago

3.4.0

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.1

5 years ago

3.0.0

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1-beta.292

5 years ago

1.0.1-beta.263

5 years ago

1.0.1-beta.262

5 years ago

1.0.1-beta.247

5 years ago

1.0.1-beta.245

5 years ago

1.0.1-beta.229

5 years ago

1.0.0

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-alpha.0

5 years ago