@forter/button
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -433,2 +433,2 @@ function _toArray(arr) { | ||
export { _toArray as toArray, _arrayWithHoles as arrayWithHoles, _iterableToArray as iterableToArray, _nonIterableRest as nonIterableRest, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _decorate as decorate }; | ||
export { _arrayWithHoles as arrayWithHoles, _decorate as decorate, _iterableToArray as iterableToArray, _nonIterableRest as nonIterableRest, _toArray as toArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey }; |
@@ -48,3 +48,7 @@ import { decorate as _decorate } from './_virtual/_rollupPluginBabelHelpers.js'; | ||
key: "icon", | ||
value: void 0 | ||
value() { | ||
return ''; | ||
} | ||
}, { | ||
@@ -56,3 +60,7 @@ kind: "field", | ||
key: "label", | ||
value: void 0 | ||
value() { | ||
return ''; | ||
} | ||
}, { | ||
@@ -77,3 +85,7 @@ kind: "field", | ||
key: "secondaryIcon", | ||
value: void 0 | ||
value() { | ||
return ''; | ||
} | ||
}, { | ||
@@ -86,3 +98,7 @@ kind: "field", | ||
key: "disabled", | ||
value: void 0 | ||
value() { | ||
return false; | ||
} | ||
}, { | ||
@@ -95,3 +111,7 @@ kind: "field", | ||
key: "active", | ||
value: void 0 | ||
value() { | ||
return false; | ||
} | ||
}, { | ||
@@ -115,3 +135,7 @@ kind: "field", | ||
key: "tooltip", | ||
value: void 0 | ||
value() { | ||
return ''; | ||
} | ||
}, { | ||
@@ -202,7 +226,3 @@ kind: "field", | ||
<div class="layout-row layout-align-center-center mrg-item"> | ||
<fc-icon | ||
width="${iconSize}" | ||
height="${iconSize}" | ||
icon="${icon}"> | ||
</fc-icon> | ||
<fc-icon icon="${icon}" size="${iconSize}"></fc-icon> | ||
</div> | ||
@@ -224,7 +244,3 @@ `} | ||
<div class="layout-row layout-align-center-center mrg-item"> | ||
<fc-icon class="mrg-item" | ||
width="${iconSize}" | ||
height="${iconSize}" | ||
icon="${secondaryIcon}"> | ||
</fc-icon> | ||
<fc-icon class="mrg-item" icon="${secondaryIcon}" size="${iconSize}"></fc-icon> | ||
</div> | ||
@@ -231,0 +247,0 @@ `} |
@@ -64,3 +64,3 @@ import { decorate as _decorate } from './_virtual/_rollupPluginBabelHelpers.js'; | ||
<button id="copy" @click=${this.copy}> | ||
<fc-icon width="18" height="18" icon="copy"></fc-icon> | ||
<fc-icon icon="copy" size="18"></fc-icon> | ||
<slot></slot> | ||
@@ -67,0 +67,0 @@ </button> |
{ | ||
"name": "@forter/button", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"description": "Button from Forter Components", | ||
@@ -52,8 +52,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"@forter/helpers": "^1.0.0-alpha.0", | ||
"@forter/icon": "^1.0.0-alpha.1", | ||
"@forter/helpers": "^1.0.0-alpha.1", | ||
"@forter/icon": "^1.0.0-alpha.2", | ||
"@forter/styles": "^1.0.0-alpha.2", | ||
"@polymer/paper-tooltip": "^3.0.1" | ||
}, | ||
"gitHead": "40656e2a022f01a6b2b3b523815a60331d3c2fca" | ||
"gitHead": "f8eae8782618154c7688b8c84892ddff96d1f82a" | ||
} |
@@ -28,17 +28,17 @@ import { LitElement, html, property } from 'lit-element'; | ||
@property({ type: String }) icon; | ||
@property({ type: String }) icon = ''; | ||
@property({ type: String }) label; | ||
@property({ type: String }) label = ''; | ||
@property({ type: String, attribute: 'icon-size' }) iconSize = DEFAULT_ICON_SIZE; | ||
@property({ type: String, attribute: 'secondary-icon' }) secondaryIcon; | ||
@property({ type: String, attribute: 'secondary-icon' }) secondaryIcon = ''; | ||
@property({ type: Boolean, reflect: true }) disabled; | ||
@property({ type: Boolean, reflect: true }) disabled = false; | ||
@property({ type: Boolean, reflect: true }) active; | ||
@property({ type: Boolean, reflect: true }) active = false; | ||
@property({ type: String, attribute: 'tooltip-position' }) tooltipPosition = 'top'; | ||
@property({ type: String }) tooltip; | ||
@property({ type: String }) tooltip = ''; | ||
@@ -100,7 +100,3 @@ @property({ type: Boolean, reflect: true }) loading = false; | ||
<div class="layout-row layout-align-center-center mrg-item"> | ||
<fc-icon | ||
width="${iconSize}" | ||
height="${iconSize}" | ||
icon="${icon}"> | ||
</fc-icon> | ||
<fc-icon icon="${icon}" size="${iconSize}"></fc-icon> | ||
</div> | ||
@@ -122,7 +118,3 @@ `} | ||
<div class="layout-row layout-align-center-center mrg-item"> | ||
<fc-icon class="mrg-item" | ||
width="${iconSize}" | ||
height="${iconSize}" | ||
icon="${secondaryIcon}"> | ||
</fc-icon> | ||
<fc-icon class="mrg-item" icon="${secondaryIcon}" size="${iconSize}"></fc-icon> | ||
</div> | ||
@@ -129,0 +121,0 @@ `} |
@@ -30,3 +30,3 @@ import { LitElement, html, property, query } from 'lit-element'; | ||
<button id="copy" @click=${this.copy}> | ||
<fc-icon width="18" height="18" icon="copy"></fc-icon> | ||
<fc-icon icon="copy" size="18"></fc-icon> | ||
<slot></slot> | ||
@@ -33,0 +33,0 @@ </button> |
@@ -17,39 +17,36 @@ import { capitalize } from '@forter/helpers'; | ||
const withTemplate = (template, overrides) => | ||
withClassPropertiesKnobs(FcButton, { template, overrides }); | ||
function defaultView() { | ||
return withTemplate(html` | ||
function elementProperties() { | ||
return withClassPropertiesKnobs(FcButton, { template: html` | ||
<fc-button></fc-button> | ||
`); | ||
`}); | ||
} | ||
function withLabel() { | ||
return withTemplate(html` | ||
return html` | ||
<fc-button label="Label"></fc-button> | ||
`); | ||
`; | ||
} | ||
function withIcon() { | ||
return withTemplate(html` | ||
return html` | ||
<fc-button icon="add"></fc-button> | ||
`); | ||
`; | ||
} | ||
function withIconAndSecondary() { | ||
return withTemplate(html` | ||
return html` | ||
<fc-button icon="add" secondary-icon="home"></fc-button> | ||
`); | ||
`; | ||
} | ||
function withLabelAndIcon() { | ||
return withTemplate(html` | ||
return html` | ||
<fc-button label="Label" icon="add"></fc-button> | ||
`); | ||
`; | ||
} | ||
function withLabelIconAndSecondary() { | ||
return withTemplate(html` | ||
return html` | ||
<fc-button label="Label" icon="add" secondary-icon="home"></fc-button> | ||
`); | ||
`; | ||
} | ||
@@ -81,5 +78,5 @@ | ||
return withTemplate(html` | ||
return html` | ||
<fc-button intent="${ifDefined(type)}" label="${label} Button" icon="${icon}"></fc-button> | ||
`); | ||
`; | ||
} | ||
@@ -113,5 +110,3 @@ | ||
</style> | ||
${withTemplate(html` | ||
<fc-button label="Stylish Button 💋" icon="add"></fc-button> | ||
`)} | ||
<fc-button label="Stylish Button 💋" icon="add"></fc-button> | ||
`; | ||
@@ -121,3 +116,3 @@ } | ||
.addDecorator(withKnobs) | ||
.add('Default', defaultView, { notes, options }) | ||
.add('ElementProperties', elementProperties, { notes, options }) | ||
.add('With Label', withLabel, { notes, options }) | ||
@@ -124,0 +119,0 @@ .add('With Icon', withIcon, { notes, options }) |
@@ -13,8 +13,7 @@ import { html } from 'lit-html' | ||
const withTemplate = (template, overrides) => withClassPropertiesKnobs(FcCopy, { template, overrides }); | ||
function defaultView() { | ||
return withTemplate(html` | ||
function elementProperties() { | ||
return withClassPropertiesKnobs(FcCopy, { template: html` | ||
<fc-copy clipboard="Copied to clipboard">Copy to Clipboard</fc-copy> | ||
`) | ||
`}); | ||
} | ||
@@ -24,3 +23,3 @@ | ||
.addDecorator(withKnobs) | ||
.add('Default', defaultView, { notes, options }) | ||
.add('Element Properties', elementProperties, { notes, options }) | ||
); |
@@ -14,4 +14,2 @@ import { html } from 'lit-html'; | ||
const withTemplate = (template, overrides) => withClassPropertiesKnobs(FcSpeech, { template, overrides }); | ||
const resultsChange = action('results-change'); | ||
@@ -26,3 +24,3 @@ const transcriptChange = action('transcript-change'); | ||
function defaultView() { | ||
function elementProperties() { | ||
return html` | ||
@@ -35,5 +33,5 @@ <style> | ||
${withTemplate(html` | ||
${withClassPropertiesKnobs(FcSpeech, { template: html` | ||
<fc-speech @result="${onResult}"></fc-speech> | ||
`)} | ||
`})} | ||
@@ -49,3 +47,3 @@ <dl> | ||
.addDecorator(withKnobs) | ||
.add('Default', defaultView, { notes, options }) | ||
.add('Element Properties', elementProperties, { notes, options }) | ||
); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67373
1613