1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 03:08:30 +00:00

Make notification button prop same as Button

This commit is contained in:
Vladimir Volek 2018-08-30 14:33:21 +02:00
parent 36673e2889
commit b1025ffbf5
2 changed files with 5 additions and 4 deletions

View File

@ -145,7 +145,8 @@ export const Notification = (props: NProps): React$Element<string> => {
type={props.className}
text={action.label}
onClick={() => { close(); action.callback(); }}
/>
>{action.label}
</NotificationButton>
))}
</ActionContent>
)}

View File

@ -62,7 +62,7 @@ const IconWrapper = styled.span`
`;
const NotificationButton = ({
className, text, icon, onClick = () => { }, type = null,
children, className, icon, onClick = () => { }, type = null,
}) => (
<Wrapper
className={className}
@ -79,11 +79,12 @@ const NotificationButton = ({
/>
</IconWrapper>
)}
{text}
{children}
</Wrapper>
);
NotificationButton.propTypes = {
children: PropTypes.element.isRequired,
type: PropTypes.string.isRequired,
className: PropTypes.string,
onClick: PropTypes.func,
@ -92,7 +93,6 @@ NotificationButton.propTypes = {
color: PropTypes.string,
size: PropTypes.number,
}),
text: PropTypes.string.isRequired,
};
export default NotificationButton;