Web: Components: added campaigns banner storybook

This commit is contained in:
Viktor Fomin 2021-06-30 18:31:44 +03:00
parent be88eae6bf
commit 1edb2662f1
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Campaigns Banner
Used to display an campaigns banner.
### Usage
```js
import CampaignsBanner from "@appserver/components/campaigns-banner";
```
```jsx
<CampaignsBanner />
```
### Properties
| Props | Type | Required | Values | Default | Description |
| ------------- | :------------: | :------: | :----: | :-----: | ----------------- |
| `headerLabel` | `string` | ✅ | - | - | |
| `textLabel` | `string` | ✅ | - | - | |
| `img` | `string` | ✅ | - | - | |
| `btnLabel` | `string` | ✅ | - | - | |
| `btnLink` | `string` | ✅ | - | - | |
| `className` | `string` | - | - | - | Accepts class |
| `id` | `string` | - | - | - | Accepts id |
| `style` | `obj`, `array` | - | - | - | Accepts css style |

View File

@ -0,0 +1,27 @@
import React from "react";
import CampaignsBanner from "./";
export default {
title: "Components/CampaignsBanner",
component: CampaignsBanner,
parameters: {
docs: {
description: {
component: "Used to display an campaigns banner.",
},
},
},
};
const Template = (args) => <CampaignsBanner {...args} />;
export const Default = Template.bind({});
Default.args = {
headerLabel: "ONLYOFFICE for business",
textLabel: "Docs, projects, clients & emails",
img: "static/images/campaign.cloud.png",
btnLabel: "START FREE TRIAL",
btnLink:
"https://www.onlyoffice.com/ru/registration.aspx?utm_source=personal&utm_campaign=BannerPersonalCloud",
};