Skip to content

Commit

Permalink
refactor: Text 컴포넌트 불필요한 prop 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
365kim committed May 3, 2021
1 parent dda79c2 commit c57b0e2
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/components/Text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,15 @@ import styles from './style.css';

const cx = classNames.bind(styles);

export const Text = ({ className, style, children, ...rest }) => {
export const Text = ({ className, children, ...rest }) => {
return (
<span className={cx('Text', className)} style={style} {...rest}>
<span className={cx('Text', className)} {...rest}>
{children}
</span>
);
};

Text.propTypes = {
className: PropTypes.string,
style: PropTypes.shape({
color: PropTypes.string,
textAlign: PropTypes.string,
fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
letterSpacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
wordSpacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
textIndent: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
}),
children: PropTypes.string.isRequired,
};

0 comments on commit c57b0e2

Please sign in to comment.