-
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.
Display overlay when feature is clicked
refs #49
- Loading branch information
1 parent
30ad2b5
commit 827ef79
Showing
5 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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,23 @@ | ||
"use client" | ||
|
||
import ButtonIcon from "." | ||
import { iconSize } from "./functions" | ||
import { ButtonIconActualProps } from "./types" | ||
|
||
export default function ButtonIconClose(props: ButtonIconActualProps) { | ||
const size = iconSize(props.size) | ||
|
||
return <ButtonIcon props={{ | ||
alt: "Close", | ||
dataCy: props.dataCy ?? "close-btn-icon", | ||
onClick: props.onClick | ||
}}> | ||
<svg xmlns="http://www.w3.org/2000/svg" | ||
width={size} | ||
height={size} | ||
viewBox="0 -960 960 960"> | ||
<path | ||
d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" /> | ||
</svg> | ||
</ButtonIcon> | ||
} |
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,20 @@ | ||
import ButtonIconClose from "@/components/button-icons/close"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
const meta: Meta<typeof ButtonIconClose> = { | ||
title: "Button Icons/Close", | ||
component: ButtonIconClose, | ||
tags: ["autodocs"], | ||
} satisfies Meta<typeof ButtonIconClose>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Example: Story = { | ||
args: { | ||
size: 48, | ||
onClick: () => { | ||
console.log("Added to favorites 💗"); | ||
}, | ||
}, | ||
}; |