@stokr/components-library
Version:
STOKR - Components Library
105 lines (101 loc) • 3.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.AgreementItemOverview = exports.AgreementItemExample = void 0;
var _react = _interopRequireDefault(require("react"));
var _AgreementItem = _interopRequireDefault(require("./AgreementItem"));
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
var _global = _interopRequireDefault(require("../../styles/global"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// import Checkbox, { CheckboxPropTypes } from '../Checkbox/Checkbox'
var _default = exports.default = {
title: 'Components Library/Agreement Item',
component: _AgreementItem.default,
argTypes: {
title: {
type: 'string',
defaultValue: ''
},
text: {
type: 'string',
defaultValue: '',
required: true
},
withTermsLink: {
type: 'boolean'
},
ventureName: {
type: 'string'
},
info: {
type: 'string',
defaultValue: ''
},
checkbox: {
type: 'shape',
defaultValue: {
id: '',
name: '',
text: '',
label: '',
value: '',
checked: false,
large: false,
error: false,
touched: false
}
},
checkboxWithFileDownload: {
type: 'shape',
defaultValue: {
id: '',
name: '',
text: '',
label: '',
value: '',
checked: false,
large: false,
error: false,
touched: false
}
}
}
};
const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_AgreementItem.default, args)));
const AgreementItemOverview = exports.AgreementItemOverview = Template.bind({});
AgreementItemOverview.args = {
title: 'Agreement Item Title',
text: 'some Text',
withTermsLink: true,
ventureName: 'Venture Name',
info: 'Info'
};
const AgreementItemExample = exports.AgreementItemExample = Template.bind({});
AgreementItemExample.args = {
title: 'disclaimer',
text: 'Before being able to view any fund offering, you, as a prospective investor, must confirm a few things. Please read check the boxes',
withTermsLink: true,
ventureName: 'Algorand',
info: 'Info',
checkbox: {
checked: true
},
checkboxWithFileDownload: {
checked: true
}
};
//doublecheck:
// CheckboxPropTypes....
// events/actions not incooporated
// onChange: { type: 'function', action: 'onChange' },
// onBlur: { type: 'function', action: 'onBlur' },
// onFocus: { type: 'function', action: 'onFocus' },
// 'Please read check the boxes to the right.' - is bad english in Disclaimer
// change since Merge:
//OfferingPageLink
//TermsOfOfferingLink
//withTermsLink
// ventureName
//checkboxwithfiledownload
//hardcoded texts all taken out.