Skip to content

Instantly share code, notes, and snippets.

@jeffdonthemic jeffdonthemic/app.js
Created Nov 16, 2018

What would you like to do?
SLDS Modal
function openModal(name) {
function closeModal(name) {
<div class="slds-col slds-no-flex slds-grid slds-align-top slds-p-bottom_xx-small">
<div class="slds-button-group" role="group">
<button class="slds-button slds-button_neutral" onclick="openModal('importBadgeModal');">Import from GUS</button>
<section id="importBadgeModal" role="dialog" tabindex="-1" aria-labelledby="importBadgeModal" aria-modal="true" aria-describedby="importBadgeModal" class="slds-modal slds-modal_small">
<div class="slds-modal__container">
<header class="slds-modal__header">
<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick="closeModal('importBadgeModal');" title="Close">
<svg class="slds-button__icon slds-button__icon_large" aria-hidden="true">
<use xmlns:xlink="" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#close" />
<span class="slds-assistive-text" onclick="closeModal('importBadgeModal');">Close</span>
<h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Import Badge from GUS</h2>
<div class="slds-modal__content slds-p-around_medium" id="importBadgeModal">
<p>Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi. Mollit officia cillum Lorem ullamco minim nostrud elit officia tempor esse quis. Cillum sunt ad dolore
quis aute consequat ipsum magna exercitation reprehenderit magna. Tempor cupidatat consequat elit dolor adipisicing.</p>
<p>Dolor eiusmod sunt ex incididunt cillum quis nostrud velit duis sit officia. Lorem aliqua enim laboris do dolor eiusmod officia. Mollit incididunt nisi consectetur esse laborum eiusmod pariatur proident. Eiusmod et adipisicing culpa deserunt nostrud
ad veniam nulla aute est. Labore esse esse cupidatat amet velit id elit consequat minim ullamco mollit enim excepteur ea.</p>
<footer class="slds-modal__footer">
<button class="slds-button slds-button_neutral" onclick="closeModal('importBadgeModal');">Cancel</button>
<button class="slds-button slds-button_brand">Save</button>
<div id="backdrop" class="slds-backdrop"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.