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:
parent
36673e2889
commit
b1025ffbf5
@ -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>
|
||||
)}
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user