-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from sprint-team3/dev
Deploy version 0.1.2
- Loading branch information
Showing
57 changed files
with
215 additions
and
52 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,106 @@ | ||
$dot-size: 0.1rem; | ||
|
||
%frame-base { | ||
@include flexbox; | ||
|
||
position: relative; | ||
border-radius: 9.9rem; | ||
} | ||
|
||
.icon-button { | ||
@extend %frame-base; | ||
|
||
border: 0.1rem solid $opacity-white-20; | ||
} | ||
|
||
.frame { | ||
&-outer { | ||
&-small { | ||
width: 4.2rem; | ||
height: 4.2rem; | ||
} | ||
|
||
&-medium { | ||
width: 5.6rem; | ||
height: 5.6rem; | ||
} | ||
|
||
&-large { | ||
width: 8rem; | ||
height: 8rem; | ||
} | ||
} | ||
|
||
&-inner { | ||
@extend %frame-base; | ||
|
||
overflow: hidden; | ||
|
||
width: 3.2rem; | ||
height: 3.2rem; | ||
|
||
background-color: $opacity-white-10; | ||
border: 0.1rem solid $white; | ||
|
||
&-small { | ||
width: 3.2rem; | ||
height: 3.2rem; | ||
} | ||
|
||
&-medium { | ||
width: 4.2rem; | ||
height: 4.2rem; | ||
} | ||
|
||
&-large { | ||
width: 6.4rem; | ||
height: 6.4rem; | ||
} | ||
|
||
&-activated { | ||
border-color: $primary; | ||
} | ||
} | ||
} | ||
|
||
.image { | ||
@include image-fit; | ||
} | ||
|
||
.dot { | ||
position: absolute; | ||
|
||
width: $dot-size; | ||
height: $dot-size; | ||
|
||
background-color: $white; | ||
border-radius: 50%; | ||
|
||
&-top { | ||
@include pos-center-x; | ||
|
||
top: -$dot-size; | ||
} | ||
|
||
&-right { | ||
@include pos-center-y; | ||
|
||
right: -$dot-size; | ||
} | ||
|
||
&-bottom { | ||
@include pos-center-x; | ||
|
||
bottom: -$dot-size; | ||
} | ||
|
||
&-left { | ||
@include pos-center-y; | ||
|
||
left: -$dot-size; | ||
} | ||
|
||
&-activated { | ||
background-color: $primary; | ||
} | ||
} |
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,37 @@ | ||
import { RefObject } from 'react'; | ||
|
||
import classNames from 'classnames/bind'; | ||
|
||
import styles from './IconButton.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
type IconButtonProps = { | ||
imageUrl: string; | ||
imageAlt: string; | ||
isActivated: boolean; | ||
onClick: () => void; | ||
buttonRef?: RefObject<HTMLButtonElement>; | ||
size?: 'small' | 'medium' | 'large'; | ||
}; | ||
|
||
export const IconButton = ({ | ||
imageUrl, | ||
imageAlt, | ||
isActivated, | ||
onClick, | ||
buttonRef, | ||
size = 'medium', | ||
}: IconButtonProps) => { | ||
return ( | ||
<button className={cx('icon-button', `frame-outer-${size}`)} onClick={onClick} ref={buttonRef}> | ||
<div className={cx('dot', 'dot-top', { 'dot-activated': isActivated })}></div> | ||
<div className={cx('dot', 'dot-right', { 'dot-activated': isActivated })}></div> | ||
<div className={cx('dot', 'dot-bottom', { 'dot-activated': isActivated })}></div> | ||
<div className={cx('dot', 'dot-left', { 'dot-activated': isActivated })}></div> | ||
<div className={cx('frame-inner', `frame-inner-${size}`, { 'frame-inner-activated': isActivated })}> | ||
<img className={cx('image')} src={imageUrl} alt={imageAlt} /> | ||
</div> | ||
</button> | ||
); | ||
}; |
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
Oops, something went wrong.