1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 22:20:06 +02:00

anchor UI element

This commit is contained in:
Sérgio Ramos 2017-01-10 14:56:14 +00:00
parent 3d3b9faa0e
commit 270842db55
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,26 @@
const constants = require('../../shared/constants');
const React = require('react');
const Styled = require('styled-components');
const {
colors
} = constants;
const {
default: styled
} = Styled;
const color = (props) => props.secondary
? colors.brandSecondaryLink
: colors.brandPrimaryLink;
const Anchor = styled.a`
color: ${color} !important;
`;
module.exports = Anchor;
module.exports.fn = (element) => (props) => React.cloneElement(element, {
...element.props,
...props
}, element.props.children);

View File

@ -1,6 +1,7 @@
module.exports = {
Base: require('./components/base'),
AddMetric: require('./components/add-metric'),
Anchor: require('./components/anchor'),
Avatar: require('./components/avatar'),
Button: require('./components/button'),
Checkbox: require('./components/checkbox'),