import { FC } from 'react';
import styles from './forms.module.scss';

type LabelProps = {
  htmlFor: string;
  required?: boolean;
};

/**
 * Label Component
 *
 * Render a HTML label element.
 */
const Label: FC<LabelProps> = ({ children, required = false, ...props }) => {
  return (
    <label className={styles.label} {...props}>
      {children}
      {required && <span className={styles.required}> *</span>}
    </label>
  );
};

export default Label;
ttps://git.armand.philippot.eu/www.armandphilippot.com' title='www.armandphilippot.com Git repository'/>
<link rel='vcs-git' href='git://git.armand.philippot.euwww.armandphilippot.com' title='www.armandphilippot.com Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/cgit-data/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/www.armandphilippot.com/'>www.armandphilippot.com</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='774d5b4c538d93889bf743b6cd7d01a85f8715e6'/><select name='h' onchange='this.form.submit();'>
<option value='main'>main</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>The frontend of my personal website.</td><td class='sub right'>Armand Philippot</td></tr></table>
<table class='tabs'><tr><td>
<a href='/www.armandphilippot.com/?h=v1.0.0'>summary</a><a href='/www.armandphilippot.com/refs/?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>refs</a><a href='/www.armandphilippot.com/log/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0'>log</a><a class='active' href='/www.armandphilippot.com/tree/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>tree</a><a href='/www.armandphilippot.com/commit/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>commit</a><a href='/www.armandphilippot.com/diff/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>diff</a><a href='/www.armandphilippot.com/stats/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/src/components/WidgetParts/OrderedList/OrderedList.tsx'>
<input type='hidden' name='h' value='v1.0.0'/><input type='hidden' name='id' value='774d5b4c538d93889bf743b6cd7d01a85f8715e6'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>root</a>/<a href='/www.armandphilippot.com/tree/src?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>src</a>/<a href='/www.armandphilippot.com/tree/src/components?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>components</a>/<a href='/www.armandphilippot.com/tree/src/components/WidgetParts?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>WidgetParts</a>/<a href='/www.armandphilippot.com/tree/src/components/WidgetParts/OrderedList?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>OrderedList</a>/<a href='/www.armandphilippot.com/tree/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>OrderedList.tsx</a></div><div class='content'>blob: a12ec06de842c1d6e3f74eaca7d67221830ff11a (<a href='/www.armandphilippot.com/plain/src/components/WidgetParts/OrderedList/OrderedList.tsx?h=v1.0.0&amp;id=774d5b4c538d93889bf743b6cd7d01a85f8715e6'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
</pre></td>
<td class='lines'><pre><code>