I am interested in creating a unique button component using HTML code like the following:
<button class="button_57" role="button">
<span class="text">Button</span>
<span>Alternate text</span>
</button>
My goal is to have the ability to use a single Button component built with React.
<CustomButton {...otherProps}>{children}</CustomButton>
Is there a way to modify the content within the spans of the Button component using props, similar to this?
<Button span_content1={''} span_content2={''}></Button>
So far, I have only discovered that passing spans as children seems to work.
<Button>
<span class='text'>Button</span>
<span>Alternate text</span>
</Button>