Skip to content

Commit

Permalink
init Quote Component
Browse files Browse the repository at this point in the history
  • Loading branch information
Knerio committed Mar 4, 2024
1 parent 2d16c53 commit 7df8e36
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/components/quote/Quote.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {Meta, StoryObj} from "@storybook/react";
import Menu from "../menu/Menu";
import {Placement} from "react-aria";
import {Quote} from "./Quote";
import React from "react";

const meta: Meta = {
title: "Quote",
component: Quote,
}

export default meta;

type MenuStory = StoryObj


export const MenuAccount: MenuStory = {
render: (args) => {
return <Quote name={"Name"} logo={"https://cdn-icons-png.flaticon.com/512/3135/3135715.png"} position={"Position"}>
My favorite UX feedback from customers is:
"How is the app so fast?"
Because we’ve built on Next.js and Vercel since day one, our pages load in an instant,
which is important when it comes to mission-critical software.
</Quote>
}
}


21 changes: 21 additions & 0 deletions src/components/quote/Quote.style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.quote {

&__text {
&:after {
right: 0;
top: 0;
position: relative;
content: "\”";
}
&:before {
right: 0;
top: 0;
position: relative;
content: "\”";
}
}

&__img {
width: 2rem;
}
}
33 changes: 33 additions & 0 deletions src/components/quote/Quote.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import {TablerIconsProps} from "@tabler/icons-react";
import Card from "../card/Card";
import "./Quote.style.scss"

export interface QuoteType {
children: React.ReactNode,
logo: string,
name: string,
position: string,
}


export interface QuoteLogo {
children: React.ReactElement<TablerIconsProps>
}

export const Quote: React.FC<QuoteType> = (props) => {
const {logo, children} = props;
return <Card>
<div className={"quote"}>
<Card.Section>
<div className={"quote__text"}>
{children}
</div>
</Card.Section>
<Card.Section>
<img className={"quote__img"} src={logo} alt={"logo"}/>
</Card.Section>

</div>
</Card>
}

0 comments on commit 7df8e36

Please sign in to comment.