-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
4d0e843
commit 823bf6f
Showing
3 changed files
with
39 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,16 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Image from '.'; | ||
|
||
const meta: Meta<typeof Image> = { | ||
component: Image, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Image>; | ||
|
||
export const Category: Story = { | ||
render: () => ( | ||
<Image src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FE2Q2S%2FbtswcHwhtdY%2FCKuiznZAZeKA72CyK0c8Y0%2Fimg.png" /> | ||
), | ||
}; |
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,17 @@ | ||
import Modal from '../Modal'; | ||
|
||
import * as S from './style'; | ||
|
||
interface ImageModalProps { | ||
src: string; | ||
} | ||
|
||
export default function Image({ src }: ImageModalProps) { | ||
return ( | ||
<Modal size="lg" onModalClose={() => {}}> | ||
<div> | ||
<S.Image src={src}></S.Image>; | ||
</div> | ||
</Modal> | ||
); | ||
} |
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 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
export const Image = styled.img` | ||
width: 100%; | ||
height: 100%; | ||
`; |