import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { wInfo } from '@utils/wInfo';
import styled from 'styled-components';
import * as tokens from '@tokens';
import { ProductCell, ProductCellBase } from '.';
import { ColorInterface } from './interface';
import ProductData from '../../data/product';
const ProductNameLink = styled.a`
color: inherit;
text-decoration: none;
&:hover {
color: ${tokens.colorPink};
}
`;
const stories = storiesOf('Product', module) as any;
stories.addWithJSX(
'Default',
wInfo(`
### Usage
~~~js
// @ts-ignore
~~~
`)(() => {
return (
);
})
);
stories.addWithJSX(
'Custom Links',
wInfo(`
### Desription
Use a default router, e.g. when use Next Routes, and pass in relevant Link component
### Usage
~~~js
const ActiveColorLink: React.ReactNode = ({
children,
color,
code
}: {
activeColor: ColorInterface;
color: ColorInterface;
code: string;
children: React.ReactChild;
}) => {
return {children};
};
const ProductLink: React.ReactNode = ({
children,
code
}: {
activeColor: ColorInterface;
color: ColorInterface;
code: string;
children: React.ReactChild;
}) => {
return {children};
};
return (
)
~~~
`)(() => {
// @ts-ignore
const ActiveColorLink: React.ReactNode = ({
children,
color,
code
}: {
activeColor: ColorInterface;
color: ColorInterface;
code: string;
children: React.ReactChild;
}) => {
return {children};
};
// @ts-ignore
const ProductLink: React.ReactNode = ({
children,
code
}: {
activeColor: ColorInterface;
color: ColorInterface;
code: string;
children: React.ReactChild;
}) => {
return {children};
};
return (
);
})
);