Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(accordion): accordion outlined with elevation wrap #1183

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions components/accordion/stories/accordion.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ export default {
};

const Template = args => html`
<vwc-accordion ...=${spread(args)}>
<vwc-expansion-panel header="Item 1">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 2">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 3">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 4">Content</vwc-expansion-panel>
</vwc-accordion>
<style>
.wrapper {
width: 500px;
}
</style>
<div class="wrapper">
<vwc-accordion ...=${spread(args)}>
<vwc-expansion-panel header="Item 1">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 2">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 3">Content</vwc-expansion-panel>
<vwc-expansion-panel header="Item 4">Content</vwc-expansion-panel>
</vwc-accordion>
</div>
`;

export const Basic = Template.bind({});
Expand Down
34 changes: 34 additions & 0 deletions components/expansion-panel/stories/expansion-panel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export default {

const Template = args => html`
<style>
vwc-expansion-panel {
width: 500px;
}
form {
display: grid;
gap: 20px;
Expand All @@ -32,6 +35,34 @@ const Template = args => html`
export const Basic = Template.bind({});
Basic.args = { header: 'Campaign Details' };

const OutlinedTemplate = args => html`
<style>
vwc-expansion-panel {
width: 500px;
}
form {
display: grid;
gap: 20px;
}
</style>
<div>
<p>expansion panel inside elevation component</p>
<vwc-elevation dp="0">
<vwc-expansion-panel header="Item 1">
<form>
A campaign describes a specific use case and details of the messages you will be sending through it.
Such as: sample messages, subscriber opt-in/out, and the associated numbers you will be sending with these messages.

<vwc-textfield label="Selected Brand" value="Vonage Inc." dense readonly></vwc-textfield>
<vwc-textfield label="Description" dense></vwc-textfield>
</form>
</vwc-expansion-panel>
</vwc-elevation>
</div>`;

export const Outlined = OutlinedTemplate.bind({});
Outlined.args = { header: 'Campaign Details' };

export const IndicatorIconSet = Template.bind({});
IndicatorIconSet.args = { header: 'Campaign Details', indicatorIconSet: 'binary' };

Expand All @@ -46,6 +77,9 @@ Icon.args = { header: 'Campaign Details', icon: 'chat-solid' };

const SlottedIconsTemplate = args => html`
<style>
vwc-expansion-panel {
width: 500px;
}
vwc-icon {
--icon-size: 20px;
}
Expand Down