Created
September 21, 2020 01:11
-
-
Save chaance/619a3c54a8fcb80bc896f1dd0580ce2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @typedef {Object} ClassifyProps | |
* @property {React.ElementType} [as] - Element to render | |
* @property {import('clsx').ClassValue} [className] - Composable classnames passed to clsx | |
*/ | |
/** | |
* @param {ClassifyProps} props | |
*/ | |
function Classify({ as: El = "div", ...props }) { | |
return <El {...props} className={clsx(props.className)} />; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment