-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: hero block base new slot + storybook
- Loading branch information
Showing
5 changed files
with
186 additions
and
20 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,97 @@ | ||
import HeroBlockBase from '../../../templates/herobase' | ||
import LinkButton from '../../../templates/linkbutton' | ||
import ContentLogoBlock from '../../../templates/contentlogo' | ||
import ImageSwitcher from '../../../templates/themeawareimageswitcher' | ||
import ListUnordered from "../../../templates/listunordered" | ||
import Titlegroup from '../../../templates/titlegroup' | ||
|
||
export default { | ||
title: 'Blocks/Hero/Products', | ||
tags: ['autodocs'], | ||
} | ||
|
||
const MOCK = { | ||
hero: { | ||
overline: "Segurança", | ||
description: | ||
'Minimize fraud, enhance uptime, and boost visibility into applications and APIs' | ||
}, | ||
"hgroup": { | ||
"subtitle": "Bot Management", | ||
"title": "Lorem ipsums dolor sit amet consectetur emit" | ||
}, | ||
CTA: [ | ||
{ | ||
label: 'Start Now', | ||
link: 'https://console.azion.com/signup/', | ||
outlined: false | ||
}, | ||
{ | ||
label: 'Get a Demo', | ||
link: '/en/contact-sales/', | ||
outlined: true | ||
} | ||
], | ||
list: { | ||
direction: 'horizontal', | ||
data: [ | ||
{ | ||
title: "Proteção", | ||
description: "Proteja suas aplicações e APIs contra SQL Injection, XSS, RFI e outras ameaças.", | ||
icon: "pi pi-lock", | ||
}, | ||
{ | ||
title: "Diverse use case", | ||
description: "Bloqueie ameaças no edge, antes de chegarem a sua aplicação ou infraestrutura. ", | ||
icon: "pi pi-shield", | ||
}, | ||
{ | ||
title: "Cost-effective", | ||
description: "Economize tempo com regras gerenciadas e passe mais tempo criando aplicações.", | ||
icon: "pi pi-clock", | ||
} | ||
] | ||
} | ||
} | ||
|
||
const HeroDisplay = ` | ||
<div class="surface-ground flex flex-col lg:gap-10 gap-5"> | ||
<HeroBlockBase | ||
v-bind="args.hero" | ||
> | ||
<template #title> | ||
<Titlegroup v-bind="args.hgroup" /> | ||
</template> | ||
<template #actions> | ||
<LinkButton v-for="button in args.CTA" v-bind="button" /> | ||
</template> | ||
<template #main> | ||
<ImageSwitcher> | ||
<template #lightImage> | ||
<img src="src/assets/images/mocks/_asset-product.png" /> | ||
</template> | ||
<template #darkImage> | ||
<img src="src/assets/images/mocks/_asset-product.png" /> | ||
</template> | ||
</ImageSwitcher> | ||
</template> | ||
<template #principal> | ||
<ListUnordered class="w-full" v-bind="args.list"/> | ||
</template> | ||
</HeroBlockBase> | ||
</div>` | ||
|
||
const Template = (args) => ({ | ||
components: { HeroBlockBase, LinkButton, ContentLogoBlock, ImageSwitcher, ListUnordered, Titlegroup }, | ||
setup() { | ||
return { args } | ||
}, | ||
template: HeroDisplay | ||
}) | ||
|
||
export const Default = Template.bind({}) | ||
Default.args = MOCK | ||
|
||
Default.parameters = { | ||
docs: { source: { code: HeroDisplay } }, | ||
}; |
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