Skip to content

Commit

Permalink
Fixed issue with primary and secondary text not showing properly in t…
Browse files Browse the repository at this point in the history
…he ActionButtonV2Grid
  • Loading branch information
KaeTheDev committed Feb 28, 2024
1 parent 1876b37 commit e5b9af7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 28 deletions.
2 changes: 2 additions & 0 deletions src/components/atoms/ActionButtonV2/ActionButtonV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ template.innerHTML = `
</div>
<div class="abutton-body">
<slot></slot>
<slot name="primary"></slot>
<slot name="secondary"></slot>
</div>
</div>
</a>
Expand Down
46 changes: 18 additions & 28 deletions src/stories/actionbuttonV2.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,17 @@ const Template = (args) => {
export const ActionButtonV2 = Template.bind({});



export const ActionButtonV2RichBody = () => html`
<div style="width: 300px; height: 300px">
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>
Anything can go inside an action button but it's best to keep to simple
text.
</p>
<img
src="https://placehold.co/800x400/000000/FFF"
alt="..."
width="100"
height="50"
/>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like click on this card</p>
</cod-action-button-v2>
</div>
`;
Expand All @@ -85,37 +77,35 @@ export const ActionButtonV2Grid = () => html`
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>Like Click on This Button</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like click on this card</p>
</cod-action-button-v2>
</div>
<div class="col-sm-4">
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
luctus eros sit amet augue tempus sollicitudin. Mauris lacinia ante
et.
</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
luctus eros sit amet augue tempus sollicitudin. Mauris lacinia ante
et.</p>
</cod-action-button-v2>
</div>
<div class="col-sm-4">
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>Like Click on This Button</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like Click on This Button</p>
</cod-action-button-v2>
</div>
</div>
Expand All @@ -124,35 +114,35 @@ export const ActionButtonV2Grid = () => html`
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>Like Click on This Button</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like Click on This Button</p>
</cod-action-button-v2>
</div>
<div class="col-sm-4">
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>Like Click on This Button</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like Click on This Button</p>
</cod-action-button-v2>
</div>
<div class="col-sm-4">
<cod-action-button-v2
btn-color="btn-outline-primary"
icon="house"
primary-text="Do Something"
href="https://example.com"
target="_blank"
>
<p>Like Click on This Button</p>
<h4 slot="primary">Do Something</h4>
<p slot="secondary">Like Click on This Button</p>
</cod-action-button-v2>
</div>
</div>
</div>
`;
`;

0 comments on commit e5b9af7

Please sign in to comment.