Skip to content

Commit

Permalink
feat(buttons.scss): add input-file feature
Browse files Browse the repository at this point in the history
close #245
  • Loading branch information
BcRikko committed Oct 17, 2019
1 parent e323e22 commit 2f58b5e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ const sampleCollection = [
<button type="button" class="nes-btn is-success">Success</button>
<button type="button" class="nes-btn is-warning">Warning</button>
<button type="button" class="nes-btn is-error">Error</button>
<button type="button" class="nes-btn is-disabled">Disabled</button>`,
<button type="button" class="nes-btn is-disabled">Disabled</button>
<label class="nes-btn">
<span>Select your file</span>
<input type="file">
</label>`,
},
{
title: 'radios',
Expand Down Expand Up @@ -362,7 +367,7 @@ const sampleCollection = [
showCode: false,
code: `<p class="nes-balloon from-left nes-pointer">
This is not a clickable element, but it's an area of the pointer.
</p>`
</p>`,
},
{
title: 'badges',
Expand Down
6 changes: 6 additions & 0 deletions scss/elements/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@
@include btn-style(nth($type, 2), nth($type, 3), nth($type, 4), nth($type, 5));
}
}

input[type="file"] {
position: absolute;
pointer-events: none;
opacity: 0;
}
}

0 comments on commit 2f58b5e

Please sign in to comment.