wix-style-react
Version:
wix-style-react
11 lines (8 loc) • 1.09 kB
JavaScript
var wrapWithDiv = function wrapWithDiv(string) {
return '<div>\n ' + string + '\n</div>';
};
var sourceForThemes = function sourceForThemes(theme) {
return '\n<Notification theme="' + theme + '" show>\n <Notification.TextLabel>' + theme + ' theme</Notification.TextLabel>\n <Notification.CloseButton/>\n</Notification>\n';
};
export var themes = wrapWithDiv(['standard', 'error', 'success', 'warning', 'premium'].map(sourceForThemes).join('\n<br/>\n'));
export var actions = '\n<div>\n <Notification show>\n <Notification.TextLabel>This notification has</Notification.TextLabel>\n <Notification.ActionButton type="textLink" onClick={() => console.log(\'Clicked!\')}>\n text link action\n </Notification.ActionButton>\n <Notification.CloseButton />\n </Notification>\n\n <br/>\n\n <Notification show>\n <Notification.TextLabel>This notification has</Notification.TextLabel>\n <Notification.ActionButton onClick={() => console.log(\'Clicked!\')}>\n button\n </Notification.ActionButton>\n <Notification.CloseButton />\n </Notification>\n</div>\n';