UNPKG
lyef-switch-button
Version:
latest (2.0.1)
2.0.1
2.0.0
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
A switch button (on/off) React component.
github.com/lyef/lyef-switch-button
lyef/lyef-switch-button
lyef-switch-button
/
src
/
Label.js
14 lines
(10 loc)
•
281 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
const
Label
= (
{ name, id }
) => (
<
label
className
=
"label"
htmlFor
=
{id}
>
{name}
</
label
>
);
Label
.
propTypes
= {
id
:
PropTypes
.
string
.
isRequired
,
name
:
PropTypes
.
string
.
isRequired
, };
export
default
Label
;