pnnl / Quality-Install-Tool

BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Create a new component <Conditional> for report #163

Open sudhacheran opened 1 year ago

sudhacheran commented 1 year ago

To make the template easier for a non-programmer to write, create a new component with a single property called condition that resolves to a boolean. If the condition is true, the Conditional's children are shown, otherwise it renders as null. It could be used here as:

< Conditional condition={props.data.comments_ductwork} > Ductwork Comments: {props.data.comments_ductwork} < /Conditional > There might be few other places in the templates where this component could be used.

Note, this can't be used inline. In particular, you can't use it inside of a table.