-
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.
- Loading branch information
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
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,6 @@ | ||
@use "design-system/colors" as *; | ||
|
||
.app-quote { | ||
border-left: 3px solid $color-primary; | ||
padding: 6px 6px 6px 18px; | ||
} |
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,27 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import AppQuote from "@/styles/app-quote/AppQuote"; | ||
import { AppQuoteProps } from "@/styles/app-quote/AppQuote.types"; | ||
|
||
const meta: Meta<AppQuoteProps> = { | ||
title: "AppQuote", | ||
component: AppQuote, | ||
tags: ["autodocs"], | ||
args: { | ||
children: | ||
"Do you have a design in mind for your blog? Whether you prefer a trendy postcard look or you’re going for a more editorial style blog - there’s a stunning layout for everyone. ", | ||
}, | ||
decorators: Story => { | ||
return ( | ||
<div style={{ maxWidth: "500px" }}> | ||
<Story /> | ||
</div> | ||
); | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<AppQuoteProps>; | ||
|
||
export const Default: Story = {}; |
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,26 @@ | ||
import { forwardRef } from "react"; | ||
|
||
import classNames from "classnames"; | ||
|
||
import "@/styles/app-quote/AppQuote.scss"; | ||
import { AppQuoteProps } from "@/styles/app-quote/AppQuote.types"; | ||
import AppTypography from "@/styles/app-typography/AppTypography"; | ||
|
||
const AppQuote = forwardRef<HTMLQuoteElement, AppQuoteProps>( | ||
({ className, ...props }, ref) => { | ||
return ( | ||
<AppTypography | ||
ref={ref} | ||
as="blockquote" | ||
variant="accent" | ||
oblique | ||
className={classNames("app-quote", className)} | ||
{...props} | ||
/> | ||
); | ||
} | ||
); | ||
|
||
AppQuote.displayName = "AppQuote"; | ||
|
||
export default AppQuote; |
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,3 @@ | ||
import { ComponentPropsWithoutRef } from "react"; | ||
|
||
export type AppQuoteProps = ComponentPropsWithoutRef<"blockquote">; |