wix-style-react
Version:
wix-style-react
40 lines (37 loc) • 1.25 kB
JavaScript
import React from 'react';
import ButtonLayout from 'wix-style-react/ButtonLayout';
import LiveCodeExample from './utils/Components/LiveCodeExample';
var children = React.createElement(
'a',
{
href: 'http://www.wix.com',
target: '_blank',
rel: 'noopener noreferrer',
style: { textDecoration: 'inherit' }
},
'Link Like Button'
);
export default {
category: 'Deprecated',
storyName: 'ButtonLayout',
component: ButtonLayout,
componentPath: '../src/ButtonLayout',
componentProps: {
children: children,
theme: 'fullblue',
height: 'medium'
},
exampleProps: {
children: [{ label: 'anchor element', value: children }, { label: 'text in span', value: React.createElement(
'span',
null,
'text in span'
) }]
},
examples: React.createElement(LiveCodeExample, {
compact: true,
title: 'LinkButton (disabled)',
autoRender: false,
initialCode: '\nconst disabled = true;\n\nrender(\n <ButtonLayout disabled={disabled}>\n <a\n href={disabled ? undefined : "http://www.wix.com"}\n target="_blank"\n rel="noopener noreferrer"\n style={{ textDecoration: \'inherit\' }}\n >\n Link Like Button\n </a>\n </ButtonLayout>\n)\n'
})
};