Editing sections
tsx
file inside the sections
folder. Additionally, a Section:
export default
). It
receives properties, returns JSX, and is invoked during each rendering of the
defined element.
Let’s explore how we can manipulate these sections and see the changes reflected
in the Admin interface.
Hero.tsx
section in the Admin interface of the site
you created in a previous tutorial.
Click on the </>
icon on the right bar to view the section’s code.
The code for this element is written in HTML with JavaScript, as shown in the
example below.
sections/Hero.tsx
to receive a new optional property, the
size
of a CTA button. Add to the CTA
type a new property, size
, which must
be one of these strings: “xs”, “sm”, “md”, and “lg”.
props
for the Sections in your site and see how they are
rendered. The preview will automatically update if you modify the Section’s code
locally.
To deploy the changes, push your updates to the main branch or publish your
environment in the Admin interface.