Skip to content

Commit

Permalink
refactor: Container 컴포넌트 재사용성 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
365kim committed May 3, 2021
1 parent 398f431 commit f96d892
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
10 changes: 3 additions & 7 deletions src/components/Container/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ import styles from './style.css';

const cx = classNames.bind(styles);

export const Container = ({ className, children, ...props }) => {
export const Container = ({ className, children, ...rest }) => {
const containerClass = cx('Container', className);

return (
<div className={containerClass} {...props}>
<div className={containerClass} {...rest}>
{children}
</div>
);
};

Container.propTypes = {
className: PropTypes.string,
children: PropTypes.any.isRequired,
};

Container.defaultProps = {
className: '',
children: PropTypes.node.isRequired,
};
5 changes: 0 additions & 5 deletions src/components/Container/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@
width: 100%;
height: 2.8125rem;
}

.CardPasswordInput {
display: flex;
flex-direction: row;
}
13 changes: 9 additions & 4 deletions src/pages/AddCardPages/AddFormPage/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,21 @@
border-radius: 50%;
}

.SecurityCodeInput__Guide__Image {
visibility: hidden;
.SecurityCodeInput__Guide__Button:hover ~ .SecurityCodeInput__Guide__Image {
visibility: visible;
}

.SecurityCodeInput__Wrapper > .Button:hover ~ .SecurityCodeInput__Guide__Image {
visibility: visible;
.SecurityCodeInput__Guide__Image {
visibility: hidden;
}

/* 비밀번호 입력 */

.CardPasswordInput {
display: flex;
flex-direction: row;
}

.CardPasswordInput__Filler {
width: 2.8125rem;
border-radius: 0.4375rem;
Expand Down

0 comments on commit f96d892

Please sign in to comment.