Skip to content

Commit

Permalink
feat(lib): add touchable zone component
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Apr 19, 2021
1 parent f115bcd commit 0f5808f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/junipero/lib/TouchableZone/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import PropTypes from 'prop-types';
import { classNames } from '@poool/junipero-utils';

const TouchableZone = ({
className,
children,
tag: Tag = 'a',
...res
}) => (
<Tag
{ ...res }
className={classNames('junipero touchable-zone', className)}
>
<span className="content">{ children }</span>
</Tag>
);

TouchableZone.propTypes = {
tag: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node,
]),
};

export default TouchableZone;

0 comments on commit 0f5808f

Please sign in to comment.