I am working with an enum called LogLevel that looks like this:
export enum LogLevel {
DEBUG = 'DEBUG',
INFO = 'INFO',
WARNING = 'WARNING',
ERROR = 'ERROR'
}
My goal is to create a dropdown select element in my form, where each option displays the enum text as its label. Here is what I have so far:
<select>
<option value="DEBUG">DEBUG</option>
<option value="INFO">INFO</option>
<option value="INFO">INFO</option>
<option value="INFO">INFO</option>
</select>
Can anyone suggest a more efficient way to achieve this?