Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ui-component-library / src / components / atoms / Link / renderProps.tsx
Size: Mime:
import React from 'react'
import { LinkProps } from './typings'
import { LinkElement } from './styled'

/**
 * rendering a children, by default it renders the text
 */
function renderChildren(props: LinkProps) {
  return props.children || props.text || 'Link'
}

/**
 * rendering the Link
 */
function renderLink(props: LinkProps) {
  const { className, target, urlBase, children, ...remainingProps } = props
  return (
    <LinkElement className={className} target={target} urlBase={urlBase} {...remainingProps}>
      {children}
    </LinkElement>
  )
}

export { renderLink, renderChildren }