This repository has been archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
355 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/nextjs-framework/widgets/call-to-action/call-to-action.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
import { OffsetStyle } from '../styling/offset-style'; | ||
import { Alignment } from '../styling/alignment'; | ||
import { ButtonType } from '../styling/button-types'; | ||
import { LinkModel } from '../../editor/widget-framework/link-model'; | ||
|
||
export class CallToActionEntity { | ||
PrimaryActionLabel?: string; | ||
PrimaryActionLink?: LinkModel; | ||
SecondaryActionLabel?: string; | ||
SecondaryActionLink?: LinkModel; | ||
Style?: { | ||
Primary?: { | ||
DisplayStyle: ButtonType | ||
}, | ||
Secondary?: { | ||
DisplayStyle: ButtonType | ||
} | ||
}; | ||
Attributes?: { [key: string]: Array<{ Key: string, Value: string}> }; | ||
Position?: { | ||
CTA: { | ||
Alignment: Alignment | ||
} | ||
}; | ||
CssClass?: string; | ||
Margins?: OffsetStyle; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`both buttons rendered (Button_Both_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start" | ||
> | ||
<a | ||
class="me-3 btn btn-primary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
> | ||
Primary Label | ||
</a> | ||
<a | ||
class="btn btn-secondary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka-2.jpg" | ||
> | ||
Secondary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`button attributes rendered (Button_Attributes_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start" | ||
wrapper-attribute-key="rapper-attribute-value" | ||
> | ||
<a | ||
class="me-3 btn btn-primary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
primary-attribute-key="primary-attribute-value" | ||
> | ||
Primary Label | ||
</a> | ||
<a | ||
class="btn btn-secondary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka-2.jpg" | ||
secondary-attribute-key="secondary-attribute-value" | ||
> | ||
Secondary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`button margins rendered (Button_Margins_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start mb-4 ms-5" | ||
> | ||
<a | ||
class="me-3 btn btn-primary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
> | ||
Primary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`button styling (Button_Styling_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-center" | ||
> | ||
<a | ||
class="me-3 btn btn-secondary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
> | ||
Primary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`primary button rendered (Button_PrimaryOnly_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start" | ||
> | ||
<a | ||
class="me-3 btn btn-primary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg?a=b#c" | ||
> | ||
Primary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`primary class overriden (Button_PrimaryClass_Overriden) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start" | ||
> | ||
<a | ||
class="me-3 btn asd" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
> | ||
Primary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`secondary button rendered (Button_SecondaryOnly_Rendered) 1`] = ` | ||
<div> | ||
<div | ||
class="d-flex align-items-center justify-content-start" | ||
> | ||
<a | ||
class="btn btn-secondary" | ||
data-call-to-action="" | ||
href="kisela-krastavichka.jpg" | ||
> | ||
Secondary Label | ||
</a> | ||
</div> | ||
</div> | ||
`; |
Oops, something went wrong.