From 9a3939f43971eb5c15482ad76bfc616ded14f6f5 Mon Sep 17 00:00:00 2001 From: mimanshi-plivo Date: Fri, 4 Aug 2023 15:58:58 +0530 Subject: [PATCH 1/7] feat: added top banner --- package-lock.json | 6 ++ src/components/TopBanner/TopBanner.stories.js | 67 +++++++++++++++++++ src/components/TopBanner/index.js | 38 +++++++++++ src/components/TopBanner/topbanner.scss | 37 ++++++++++ 4 files changed, 148 insertions(+) create mode 100644 src/components/TopBanner/TopBanner.stories.js create mode 100644 src/components/TopBanner/index.js create mode 100644 src/components/TopBanner/topbanner.scss diff --git a/package-lock.json b/package-lock.json index 11e7ada..28ec663 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27329,6 +27329,12 @@ } } }, + "wavesurfer.js": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-7.1.1.tgz", + "integrity": "sha512-nChYa5M4tOGkTP4EtzyHXY3pk/T7bI2ttv6A5wFPS/3+jjQ8I85esqqPn52+ZJyE72r2hpgk863xekgRswAcaw==", + "dev": true + }, "wbuf": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", diff --git a/src/components/TopBanner/TopBanner.stories.js b/src/components/TopBanner/TopBanner.stories.js new file mode 100644 index 0000000..cdf7f95 --- /dev/null +++ b/src/components/TopBanner/TopBanner.stories.js @@ -0,0 +1,67 @@ +import React from 'react' +import { TopBanner, BannerType } from './' +import { Button } from '../Button' + +export default { + title: 'Components/TopBanner', + component: TopBanner, + argTypes: { + type: { + options: BannerType, + control: { type: 'select' }, + }, + }, +} + +const Template = (args) => + +export const Default = Template.bind({}) +Default.args = { + visible: true, + content: 'This is default type banner.', +} + +export const Success = Template.bind({}) +Success.args = { + visible: true, + content: 'This is success type banner.', + type: 'success', +} + +export const Danger = Template.bind({}) +Danger.args = { + visible: true, + content: 'This is danger type banner.', + type: 'danger', +} + +export const Warning = Template.bind({}) +Warning.args = { + visible: true, + content: 'This is warning type banner.', + type: 'warning', +} + +export const BannerWithButton = Template.bind({}) +BannerWithButton.args = { + visible: true, + content: 'This is banner with action button.', + type: 'default', + buttons: [ +