mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
24 lines
372 B
JavaScript
24 lines
372 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const styles = {
|
|
label: {
|
|
padding: '0 6px',
|
|
},
|
|
};
|
|
|
|
function Label({ id, content }) {
|
|
return (
|
|
<label style={styles.label} htmlFor={id}>
|
|
{content}
|
|
</label>
|
|
);
|
|
}
|
|
|
|
Label.propTypes = {
|
|
content: PropTypes.string.isRequired,
|
|
id: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default Label;
|