Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/packages / pages / Home / MultiBanner / renderProps.js
Size: Mime:
import * as React from 'react';
import { Link } from '@skava/link';
import { GhostButton } from '@skava/packages/ui';
import BannerItem from './BannerItem';
import { Title } from './styled';
export const LinkAdapter = (props) => React.createElement(Link, Object.assign({ to: props.url }, props));
export const renderItem = (item, index) => {
    const { categoryLink: url, categoryName: text, ...remainingProps } = item;
    const itemProps = {
        url,
        text,
        index,
        ...remainingProps,
    };
    const key = url + item.title + index + text;
    return React.createElement(BannerItem, Object.assign({}, itemProps, { key: key }));
};
export const MultiBannerItemTitle = (props) => (React.createElement(Title, { dangerouslySetInnerHTML: { __html: `${props.text}` } }));
export const MultiBannerItemCallToAction = (props) => React.createElement(GhostButton, null, props.text);
//# sourceMappingURL=renderProps.js.map