Skip to content

Commit

Permalink
update component
Browse files Browse the repository at this point in the history
  • Loading branch information
palmerminto committed Nov 17, 2023
1 parent b7bad38 commit 71877ca
Show file tree
Hide file tree
Showing 23 changed files with 6,048 additions and 3,824 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/require-allow-edits.yml

This file was deleted.

9 changes: 3 additions & 6 deletions .storybook-css/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { setOptions } from '@storybook/addon-options';

import registerCSSInterfaceWithDefaultTheme from '../src/utils/registerCSSInterfaceWithDefaultTheme';

import '../css/storybook.scss';
import '../css/styles.css';

registerCSSInterfaceWithDefaultTheme();

addDecorator((story) => {
Expand All @@ -21,8 +18,8 @@ function getLink(href, text) {
return `<a href=${href} rel="noopener noreferrer" target="_blank">${text}</a>`;
}

const README = getLink('https://github.com/react-dates/react-dates/blob/HEAD/README.md', 'README');
const wrapperSource = getLink('https://github.com/react-dates/react-dates/tree/HEAD/examples', 'wrapper source');
const README = getLink('https://github.com/vizzly-co/react-dates-17/blob/HEAD/README.md', 'README');
const wrapperSource = getLink('https://github.com/vizzly-co/react-dates-17/tree/HEAD/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
Expand Down Expand Up @@ -52,7 +49,7 @@ addDecorator(story => (

setOptions({
name: 'REACT-DATES',
url: 'https://github.com/react-dates/react-dates',
url: 'https://github.com/vizzly-co/react-dates-17',
});

function loadStories() {
Expand Down
76 changes: 39 additions & 37 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,81 @@
import React from 'react';
import React from "react";

if (process.env.NODE_ENV !== 'production') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
if (process.env.NODE_ENV !== "production") {
const whyDidYouRender = require("@welldone-software/why-did-you-render");
whyDidYouRender(React);
}

import moment from 'moment';
import aphroditeInterface from 'react-with-styles-interface-aphrodite';
import moment from "moment";
import aphroditeInterface from "react-with-styles-interface-aphrodite";

import { configure, addDecorator, setAddon } from '@storybook/react';
import infoAddon from '@storybook/addon-info';
import { setOptions } from '@storybook/addon-options';
import { configure, addDecorator, setAddon } from "@storybook/react";
import infoAddon from "@storybook/addon-info";
import { setOptions } from "@storybook/addon-options";

import registerInterfaceWithDefaultTheme from '../src/utils/registerInterfaceWithDefaultTheme';

import '../css/storybook.scss';
import registerInterfaceWithDefaultTheme from "../src/utils/registerInterfaceWithDefaultTheme";

registerInterfaceWithDefaultTheme(aphroditeInterface);

addDecorator((story) => {
moment.locale('en');
moment.locale("en");
return story();
});

function getLink(href, text) {
return `<a href=${href} rel="noopener noreferrer" target="_blank">${text}</a>`;
}

const README = getLink('https://github.com/react-dates/react-dates/blob/HEAD/README.md', 'README');
const wrapperSource = getLink('https://github.com/react-dates/react-dates/tree/HEAD/examples', 'wrapper source');
const README = getLink(
"https://github.com/vizzly-co/react-dates-17/blob/HEAD/README.md",
"README"
);
const wrapperSource = getLink(
"https://github.com/vizzly-co/react-dates-17/tree/HEAD/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 => (
addDecorator((story) => (
<div>
<div
style={{
background: '#fff',
background: "#fff",
height: 6 * 8,
width: '100%',
position: 'fixed',
width: "100%",
position: "fixed",
top: 0,
left: 0,
padding: '8px 40px 8px 8px',
overflow: 'scroll',
padding: "8px 40px 8px 8px",
overflow: "scroll",
}}
dangerouslySetInnerHTML={{ __html: helperText }}
/>

<div style={{ marginTop: 7 * 8 }}>
{story()}
</div>
<div style={{ marginTop: 7 * 8 }}>{story()}</div>
</div>
));

setOptions({
name: 'REACT-DATES',
url: 'https://github.com/react-dates/react-dates',
name: "REACT-DATES",
url: "https://github.com/vizzly-co/react-dates-17",
});

function loadStories() {
require('../stories/DateRangePicker');
require('../stories/DateRangePicker_input');
require('../stories/DateRangePicker_calendar');
require('../stories/DateRangePicker_day');
require('../stories/SingleDatePicker');
require('../stories/SingleDatePicker_input');
require('../stories/SingleDatePicker_calendar');
require('../stories/SingleDatePicker_day');
require('../stories/DayPickerRangeController');
require('../stories/DayPickerSingleDateController');
require('../stories/DayPicker');
require('../stories/PresetDateRangePicker');
require("../stories/DateRangePicker");
require("../stories/DateRangePicker_input");
require("../stories/DateRangePicker_calendar");
require("../stories/DateRangePicker_day");
require("../stories/SingleDatePicker");
require("../stories/SingleDatePicker_input");
require("../stories/SingleDatePicker_calendar");
require("../stories/SingleDatePicker_day");
require("../stories/DayPickerRangeController");
require("../stories/DayPickerSingleDateController");
require("../stories/DayPicker");
require("../stories/PresetDateRangePicker");
}

setAddon(infoAddon);
Expand Down
Loading

0 comments on commit 71877ca

Please sign in to comment.