@@ -27,69 +27,69 @@ export default {
27
27
]
28
28
} as Meta
29
29
30
- export const Mail = ( ) => {
31
- const args = {
32
- smartyTags : {
33
- 'Customer.FirstName' : 'Customer FirstName' ,
34
- 'Customer.LastName' : 'Customer LastName' ,
35
- 'Customer.Email' : 'Customer Email' ,
36
- 'Appointment.ServiceName' : 'Appointment ServiceName' ,
37
- 'Appointment.StaffName' : 'Appointment StaffName' ,
38
- 'Appointment.Time' : 'Appointment Time' ,
39
- branding : true ,
40
- footer : '<h1>hello</h1>'
41
- } ,
42
- template : Templates . Mail
43
- }
44
- const [ state , setState ] = useStore < DndState > ( 'mail-state' , createDndState ( ) )
45
- React . useEffect ( ( ) => {
46
- console . log ( state )
47
- } , [ state ] )
48
- return < DndEditor { ...args } value = { state } onHtmlChange = { console . log } onChange = { setState } />
49
- }
30
+ // export const Mail = () => {
31
+ // const args = {
32
+ // smartyTags: {
33
+ // 'Customer.FirstName': 'Customer FirstName',
34
+ // 'Customer.LastName': 'Customer LastName',
35
+ // 'Customer.Email': 'Customer Email',
36
+ // 'Appointment.ServiceName': 'Appointment ServiceName',
37
+ // 'Appointment.StaffName': 'Appointment StaffName',
38
+ // 'Appointment.Time': 'Appointment Time',
39
+ // branding: true,
40
+ // footer: '<h1>hello</h1>'
41
+ // },
42
+ // template: Templates.Mail
43
+ // }
44
+ // const [state, setState] = useStore<DndState>('mail-state', createDndState())
45
+ // React.useEffect(() => {
46
+ // console.log(state)
47
+ // }, [state])
48
+ // return <DndEditor {...args} value={state} onHtmlChange={console.log} onChange={setState} />
49
+ // }
50
50
51
- export const Form = ( ) => {
52
- const args = {
53
- smartyTags : {
54
- 'Appointment.ServiceName' : 'Appointment ServiceName' ,
55
- branding : true ,
56
- footer : '<h1>hello</h1>'
57
- } ,
58
- items : [
59
- FormElements ,
60
- Blocks . Divider ,
61
- ...Object . values ( Blocks ) . filter (
62
- ( block : DndBlockItem ) => block . parent === 'form-elements'
63
- )
64
- ] ,
65
- template : Templates . Form
66
- }
67
- const [ state , setState ] = useStore < DndState > ( 'form-state' , createDndState ( ) )
68
- React . useEffect ( ( ) => {
69
- console . log ( state )
70
- } , [ state ] )
71
- return < DndEditor { ...args } value = { state } onChange = { setState } />
72
- }
73
- export const FormRenderer = ( ) => {
74
- const [ state ] = useStore < DndState > ( 'form-state' , createDndState ( ) )
75
- const [ initialValues , setInitialValues ] = useStore ( 'form-initialValues' , { } )
76
- React . useEffect ( ( ) => {
77
- console . log ( state )
78
- } , [ state ] )
79
- React . useEffect ( ( ) => {
80
- console . log ( initialValues )
81
- } , [ initialValues ] )
82
- return (
83
- < LocalizationProvider dateAdapter = { MomentUtils } >
84
- < Button form = "asdasdasd" type = "submit" >
85
- Submit
86
- </ Button >
87
- < Renderer
88
- state = { state }
89
- initialValues = { initialValues }
90
- onChange = { setInitialValues }
91
- formId = "asdasdasd"
92
- />
93
- </ LocalizationProvider >
94
- )
95
- }
51
+ // export const Form = () => {
52
+ // const args = {
53
+ // smartyTags: {
54
+ // 'Appointment.ServiceName': 'Appointment ServiceName',
55
+ // branding: true,
56
+ // footer: '<h1>hello</h1>'
57
+ // },
58
+ // items: [
59
+ // FormElements,
60
+ // Blocks.Divider,
61
+ // ...Object.values(Blocks).filter(
62
+ // (block: DndBlockItem) => block.parent === 'form-elements'
63
+ // )
64
+ // ],
65
+ // template: Templates.Form
66
+ // }
67
+ // const [state, setState] = useStore<DndState>('form-state', createDndState())
68
+ // React.useEffect(() => {
69
+ // console.log(state)
70
+ // }, [state])
71
+ // return <DndEditor {...args} value={state} onChange={setState} />
72
+ // }
73
+ // export const FormRenderer = () => {
74
+ // const [state] = useStore<DndState>('form-state', createDndState())
75
+ // const [initialValues, setInitialValues] = useStore('form-initialValues', {})
76
+ // React.useEffect(() => {
77
+ // console.log(state)
78
+ // }, [state])
79
+ // React.useEffect(() => {
80
+ // console.log(initialValues)
81
+ // }, [initialValues])
82
+ // return (
83
+ // <LocalizationProvider dateAdapter={MomentUtils}>
84
+ // <Button form="asdasdasd" type="submit">
85
+ // Submit
86
+ // </Button>
87
+ // <Renderer
88
+ // state={state}
89
+ // initialValues={initialValues}
90
+ // onChange={setInitialValues}
91
+ // formId="asdasdasd"
92
+ // />
93
+ // </LocalizationProvider>
94
+ // )
95
+ // }
0 commit comments