SUI-Components/sui-components

✨field refactor

Closed this issue · 2 comments

Is your iteration request related to a problem?

No response

Describe the solution you'd like

in components/molecule/field/src/Label
the...

// innerLabel fn
if(label) {
	if(isElement(label) ) {
		// return case A**
    } else {
		// this is different
	}
} else if(nodeLabel) {
	// retrun case B**
}
// return null

... return case A and B are equal. Simplify that conditional clausules to join both cases and remove the ternary

Screenshots

No response

Additional context**

No response

Additional info

No response

Can I take it?

Yeah!