UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

45 lines (37 loc) 1.13 kB
import React, { Component } from "react"; import { Link } from "react-router"; import Radium from "radium"; var LinkRadium = Radium(Link); const InsightSearchLinkRouterLinkStyle = { linkWrapper: { margin: '-15px', ':hover': { backgroundColor: '#393939' } }, linkDark: { padding: '15px' }, link: { textDecoration: 'none', fontSize: '14px', display: 'flex', color: '#06979E' } }; class InsightSearchLinkRouterLink extends Component { render() { const { query, dark } = this.props; let linkWrapperStyle = []; let linkStyle = [ InsightSearchLinkRouterLinkStyle.link ]; if( dark ) { linkWrapperStyle.push( InsightSearchLinkRouterLinkStyle.linkWrapper ); linkStyle.push( InsightSearchLinkRouterLinkStyle.linkDark ); } return (<div style={linkWrapperStyle}><LinkRadium style={linkStyle} to={`/search/${query}`}> {this.props.children} </LinkRadium></div>); } } export default Radium( InsightSearchLinkRouterLink );