()
| 4 | from .state import ContactState |
| 5 | |
| 6 | def contact_form() -> rx.Component: |
| 7 | return rx.form( |
| 8 | # rx.cond( |
| 9 | # SessionState.my_user_id, |
| 10 | # rx.box( |
| 11 | # rx.input( |
| 12 | # type='hidden', |
| 13 | # name='user_id', |
| 14 | # value=SessionState.my_user_id |
| 15 | # ), |
| 16 | # display='none' |
| 17 | # ), |
| 18 | # rx.fragment('') |
| 19 | # ), |
| 20 | rx.vstack( |
| 21 | rx.hstack( |
| 22 | rx.input( |
| 23 | name="first_name", |
| 24 | placeholder="First Name", |
| 25 | required=True, |
| 26 | type='text', |
| 27 | width='100%', |
| 28 | ), |
| 29 | rx.input( |
| 30 | name="last_name", |
| 31 | placeholder="Last Name", |
| 32 | type='text', |
| 33 | width='100%', |
| 34 | ), |
| 35 | width='100%' |
| 36 | ), |
| 37 | rx.input( |
| 38 | name='email', |
| 39 | placeholder='Your email', |
| 40 | type='email', |
| 41 | width='100%', |
| 42 | ), |
| 43 | rx.text_area( |
| 44 | name='message', |
| 45 | placeholder="Your message", |
| 46 | required=True, |
| 47 | width='100%', |
| 48 | ), |
| 49 | rx.button("Submit", type="submit"), |
| 50 | ), |
| 51 | on_submit=ContactState.handle_submit, |
| 52 | reset_on_submit=True, |
| 53 | ) |
nothing calls this directly
no outgoing calls
no test coverage detected