From 866329ba63f8dac16ab57fe11705e7131a4a84ec Mon Sep 17 00:00:00 2001 From: Daksh Singh Rathore Date: Wed, 13 Dec 2023 14:19:27 +0530 Subject: [PATCH] code: added relevant args for cta --- src/stories/Components/Button.stories.jsx | 60 ++++++++--------- src/stories/Components/Cta.jsx | 82 +++++++++++++---------- src/stories/Components/Cta.stories.jsx | 4 +- 3 files changed, 79 insertions(+), 67 deletions(-) diff --git a/src/stories/Components/Button.stories.jsx b/src/stories/Components/Button.stories.jsx index 7ba7828..3af7ffc 100644 --- a/src/stories/Components/Button.stories.jsx +++ b/src/stories/Components/Button.stories.jsx @@ -17,37 +17,37 @@ export default { }; // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -export const Primary = { - args: { - primary: true, - label: 'Primary', - }, -}; + export const Primary = { + args: { + primary: true, + label: 'Primary', + }, + }; -export const Secondary = { - args: { - label: 'Secondary', - }, -}; + export const Secondary = { + args: { + label: 'Secondary', + }, + }; -export const Large = { - args: { - size: 'large', - label: 'Large', - }, -}; + export const Large = { + args: { + size: 'large', + label: 'Large', + }, + }; -export const Small = { - args: { - size: 'small', - label: 'Small', - }, -}; + export const Small = { + args: { + size: 'small', + label: 'Small', + }, + }; -export const Warning = { - args: { - primary: true, - label: 'Delete now', - backgroundColor: 'red', - } -}; \ No newline at end of file + export const Warning = { + args: { + primary: true, + label: 'Delete now', + backgroundColor: 'red', + } + }; \ No newline at end of file diff --git a/src/stories/Components/Cta.jsx b/src/stories/Components/Cta.jsx index 7ef8f25..e36e332 100644 --- a/src/stories/Components/Cta.jsx +++ b/src/stories/Components/Cta.jsx @@ -1,45 +1,57 @@ import React from 'react' +import PropTypes from 'prop-types'; import 'tailwindcss/tailwind.css'; -export default function Cta() { + +function Cta({ title, description, buttonText, buttonLink, imageSrc, }) { return (
- {/* - Heads up! 👋 - - This component comes with some `rtl` classes. Please remove them if they are not needed in your project. -*/} - -
-
-
-

- Lorem, ipsum dolor sit amet consectetur adipisicing elit -

- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Et, egestas tempus tellus etiam - sed. Quam a scelerisque amet ullamcorper eu enim et fermentum, augue. Aliquet amet volutpat - quisque ut interdum tincidunt duis. -

+
+
+
+

+ {title} +

- -
-
+

+ {description} +

- Student -
+ +
+
+ Student +
) } + +Cta.propTypes = { + title: PropTypes.string, + description: PropTypes.string, + buttonText: PropTypes.string, + buttonLink: PropTypes.string, + imageSrc: PropTypes.string, +}; + +Cta.defaultProps = { + title: 'Lorem, ipsum dolor sit amet consectetur adipisicing elit', + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Et, egestas tempus tellus etiam sed. Quam a scelerisque amet ullamcorper eu enim et fermentum, augue. Aliquet amet volutpat quisque ut interdum tincidunt duis.', + buttonText: 'Get Started Today', + buttonLink: '#', + imageSrc: 'https://images.unsplash.com/photo-1464582883107-8adf2dca8a9f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80', + +}; + +export default Cta; diff --git a/src/stories/Components/Cta.stories.jsx b/src/stories/Components/Cta.stories.jsx index 3c1002b..bc41846 100644 --- a/src/stories/Components/Cta.stories.jsx +++ b/src/stories/Components/Cta.stories.jsx @@ -12,6 +12,6 @@ export default { }, }; +export const CtaPage = (args) => ; + - - export const CtaPage= (args) => ;