Skip to content
Snippets Groups Projects
Commit a851338b authored by Maja Wichrowska's avatar Maja Wichrowska
Browse files

Simplify the README

parent c72fe6b7
No related branches found
No related tags found
No related merge requests found
import React from 'react';
import moment from 'moment';
import { configure, addDecorator, setAddon } from '@kadira/storybook';
import infoAddon from '@kadira/react-storybook-addon-info';
......@@ -8,6 +9,40 @@ addDecorator((story) => {
return (story());
});
function getLink(href, text) {
return `<a href=${href} rel="noopener noreferrer" target="_blank">${text}</a>`;
}
const README = getLink('https://github.com/airbnb/react-dates/blob/master/README.md', 'README');
const wrapperSource = getLink('https://github.com/airbnb/react-dates/tree/master/examples', 'wrapper source');
const helperText = `All examples are built using a wrapper component that is not exported by
react-dates. Please see the ${README} for more information about minimal setup or explore
the ${wrapperSource} to see how to integrate react-dates into your own app.`;
addDecorator(story => (
<div>
<div
style={{
background: '#fff',
height: 6 * 8,
width: '100%',
position: 'fixed',
top: 0,
left: 0,
padding: '8px 40px 8px 8px',
overflow: 'scroll',
}}
>
<span dangerouslySetInnerHTML={{ __html: helperText }} />
</div>
<div style={{ marginTop: 7 * 8 }}>
{story()}
</div>
</div>
));
function loadStories() {
require('../stories/DateRangePicker');
require('../stories/DateRangePicker_input');
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment