1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +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} type={props.className}
text={action.label} text={action.label}
onClick={() => { close(); action.callback(); }} onClick={() => { close(); action.callback(); }}
/> >{action.label}
</NotificationButton>
))} ))}
</ActionContent> </ActionContent>
)} )}

View File

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