Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@forter/button

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forter/button - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

stories/button.attributes.stories.js

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [4.0.4](https://github.com/forter/web-components/compare/@forter/button@4.0.3...@forter/button@4.0.4) (2019-09-19)
**Note:** Version bump only for package @forter/button
## [4.0.3](https://github.com/forter/web-components/compare/@forter/button@4.0.2...@forter/button@4.0.3) (2019-09-19)

@@ -8,0 +16,0 @@

6

package.json
{
"name": "@forter/button",
"version": "4.0.3",
"version": "4.0.4",
"description": "Button from Forter Components",

@@ -51,3 +51,3 @@ "main": "index.js",

"@forter/core": "^2.0.0",
"@forter/icon": "^3.2.1",
"@forter/icon": "^3.2.2",
"@forter/mixins": "^3.0.0",

@@ -59,3 +59,3 @@ "@forter/styles": "^3.2.1",

},
"gitHead": "cb4bd2ac6e3727eb43e30dbccec7bdf7ee53efcc"
"gitHead": "0aae1f4ddd21eb0daaab2d0b142f7eb25bd511e1"
}

@@ -1,2 +0,2 @@

import { capitalize } from '../../../lib/functions/src/capitalize';
import markdown from '../README.md';

@@ -7,11 +7,8 @@ import { html } from 'lit-html';

import { withKnobs, boolean, color, number, select, text } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/polymer';
import '../src/fc-button';
import markdown from '../README.md';
import { enumerateProperties } from '../../../lib/storybook-helpers';
import '../src';
import { FcButton } from '../src/FcButton';
const story = enumerateProperties(FcButton);
const notes = { markdown };
const options = { selectedPanel: 'storybooks/knobs/panel' };
const INTENT_OPTIONS = {

@@ -26,4 +23,4 @@ Apply: 'apply',

function elementProperties() {
return html`
export function attributesAndStyles() {
return story(html`
<style>

@@ -65,82 +62,12 @@ fc-button {

>${text('text content', 'Button')}</fc-button>
`;
`);
}
function withLabel() {
return html`
<fc-button label="Label" @click="${action('click')}">Button</fc-button>
`;
}
function withIcon() {
return html`
<fc-button icon="add"></fc-button>
`;
}
function withIconAndSecondary() {
return html`
<fc-button icon="add" secondary-icon="search"></fc-button>
`;
}
function withLabelAndIcon() {
return html`
<fc-button label="Label" icon="add">Button</fc-button>
`;
}
function withLabelIconAndSecondary() {
return html`
<fc-button label="Label" icon="add" secondary-icon="search">Button</fc-button>
`;
}
function intentButton(intent = null, documentation = '') {
return function noIntentButton() {
const intentKnob = select('Intent', INTENT_OPTIONS, intent);
const icon =
intentKnob === 'apply' ? 'edit'
: intentKnob === 'danger' ? 'delete'
: intentKnob === 'cancel' ? 'search'
: intentKnob === 'success' ? 'star-true'
: intentKnob === 'warn' ? 'skip'
: 'forter';
const type = intentKnob || intent;
const label = !type ? 'No Intent' : capitalize(intentKnob);
return html`${documentation}
<fc-button intent="${ifDefined(type)}" icon="${icon}">${label} Button</fc-button>
`;
};
}
(storiesOf('Controls|Button', module)
.addDecorator(withKnobs)
.addParameters({ notes })
.add('Attributes and Styles', elementProperties)
);
(storiesOf('Controls|Button/Attributes', module)
.addDecorator(withKnobs)
.addParameters({ notes, options })
.add('Label', withLabel)
.add('Icon', withIcon)
.add('Icon and Secondary Icon', withIconAndSecondary)
.add('Label and Icon', withLabelAndIcon)
.add('Label, Icon, and Secondary Icon', withLabelIconAndSecondary)
);
(storiesOf('Controls|Button/Intents', module)
.addDecorator(withKnobs)
.addParameters({ notes, options })
.add('No Intent', intentButton())
.add('Apply', intentButton('apply'))
.add('Success', intentButton('success'))
.add('Danger', intentButton('danger'))
.add('Warn', intentButton('warn'))
.add('Cancel', intentButton('cancel'))
);
export default {
title: 'Controls|Button',
decorators: [withKnobs],
parameters: {
notes: { markdown },
options: { selectedPanel: 'storybooks/knobs/panel' },
},
};
import { html } from 'lit-html';
import { storiesOf } from '@storybook/polymer';
import { withKnobs, text } from '@storybook/addon-knobs';

@@ -12,7 +11,4 @@ import { action } from '@storybook/addon-actions';

import markdown from '../README.md';
const notes = { markdown };
const options = { selectedPanel: 'storybooks/knobs/panel' };
function elementProperties() {
export function elementProperties() {
return html`

@@ -26,5 +22,9 @@ <fc-copy

(storiesOf('Controls|Button/Copy Button', module)
.addDecorator(withKnobs)
.add('Element Properties', elementProperties, { notes, options })
);
export default {
title: 'Controls|Button/Copy Button',
decorators: [withKnobs],
parameters: {
notes: { markdown },
options: { selectedPanel: 'storybooks/knobs/panel' },
},
};
import { html } from 'lit-html';
import { withKnobs } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/polymer';
import '../src/fc-speech';
import { enumerateProperties } from '../../../lib/storybook-helpers';
import '../src';
import { FcSpeech } from '../src/FcSpeech';
const story = enumerateProperties(FcSpeech);
import markdown from '../README.md';
const notes = { markdown };
const options = { selectedPanel: 'storybooks/knobs/panel' };

@@ -22,22 +21,19 @@ const resultsChange = action('results-change');

function elementProperties() {
return html`
<style>
body {
font-family: "Open Sans";
}
</style>
<fc-speech @result="${onResult}"></fc-speech>
<dl>
<dt>Transcript</dt>
<dd><output id="transcript"></output></dd>
</dl>
`;
export function elementProperties() {
return story(html`
<fc-speech @result="${onResult}"></fc-speech>
<dl>
<dt>Transcript</dt>
<dd><output id="transcript"></output></dd>
</dl>
`);
}
(storiesOf('Controls|Button/Speech Button', module)
.addDecorator(withKnobs)
.add('Element Properties', elementProperties, { notes, options })
);
export default {
title: 'Controls|Button/Speech Button',
decorators: [withKnobs],
parameters: {
notes: { markdown },
options: { selectedPanel: 'storybooks/knobs/panel' },
},
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc