Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fontSize: '18px',
lineHeight: '1',
marginLeft: 'auto'
}),
votes: css({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
}),
vote: css({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
}),
voteDivider: css({
color: colors.disabled,
padding: '0 2px'
})
}
// Use the 'iconSize' to adjust the visual weight of the icon. For example
// the 'MdShareIcon' looks much larger next to 'MdKeyboardArrowUp' if both
// have the same dimensions.
//
// The outer dimensions of the action button element is always the same:
// square and as tall as the 'CommentAction' component.
const IconButton = ({ iconSize, type = 'right', onClick, title, children, style = {} }) => (
<button disabled="{!onClick}" title="{title}">
{children}</button>import React from 'react'
import { compose } from 'react-apollo'
import { withRouter } from 'next/router'
import { Link } from '../../lib/routes'
import { css } from 'glamor'
import { colors, linkRule } from '@project-r/styleguide'
import withT from '../../lib/withT'
import { intersperse } from '../../lib/utils/helpers'
const styles = {
disabled: css({
color: colors.disabled,
}),
}
const menu = [
{
key: 'edit',
route: 'repo/edit',
},
{
key: 'tree',
route: 'repo/tree',
},
]
const Nav = ({ router, route, isNew, t }) => {
const { repoId } = router.querycursor: 'pointer',
'@media (hover)': {
':hover': {
backgroundColor: colors.primary,
borderColor: colors.primary,
color: '#fff'
}
},
':active': {
backgroundColor: colors.secondary,
borderColor: colors.secondary,
color: '#fff'
},
':disabled, [disabled]': {
backgroundColor: '#fff',
color: colors.disabled,
borderColor: colors.disabled,
cursor: 'default'
}
})
const primaryStyle = css({
backgroundColor: colors.primary,
borderColor: colors.primary,
color: '#fff',
'@media(hover)': {
':hover': {
backgroundColor: colors.secondary,
borderColor: colors.secondary
}
},
':active': {renderSelectedItem = () => {
const { document } = this.state
return (
<div>
<div> this.handleChange(null)}
>
</div>
</div>
)
}}
}
}),
linkDark: css({
color: negativeColors.text,
':visited': {
color: negativeColors.text
},
'@media (hover)': {
':hover': {
color: negativeColors.lightText
}
}
}),
linkFadedLight: css({
color: colors.disabled,
':visited': {
color: colors.disabled
},
'@media (hover)': {
':hover': {
color: colors.primary
}
}
}),
linkFadedDark: css({
color: colors.disabled,
':visited': {
color: colors.disabled
},
'@media (hover)': {
':hover': {'@media (hover)': {
':hover': {
backgroundColor: colors.primary,
borderColor: colors.primary,
color: '#fff'
}
},
':active': {
backgroundColor: colors.secondary,
borderColor: colors.secondary,
color: '#fff'
},
':disabled, [disabled]': {
backgroundColor: '#fff',
color: colors.disabled,
borderColor: colors.disabled,
cursor: 'default'
}
})
const primaryStyle = css({
backgroundColor: colors.primary,
borderColor: colors.primary,
color: '#fff',
'@media(hover)': {
':hover': {
backgroundColor: colors.secondary,
borderColor: colors.secondary
}
},
':active': {
backgroundColor: '#000',label={t('feedback/articleSearch/label')}
value={value}
filter={filter}
isOpen={isOpen !== undefined ? isOpen : undefined}
onChange={this.onChange}
onFilterChange={this.onFilterChange}
items={items}
icon={
loading ? (
<div style="{{">
</div>
) : filter ? (
) : (
)
}
/>
)
}
}selected,
iconSize,
Wrapper = DefaultWrapper
}) => (
<span selected="" style="{{">
{title}
</span>
{newPage && (
<span title="{t('feedback/articleItem/newPage/title')}">
</span>
)}
)
export const NoResultsItem = ({ title }) => (
<p style="{{">{title}</p>
)})
export const sectionHeader = merge(heading, section)
export const outline = css({
border: `3px solid ${colors.primary}`,
position: 'absolute',
zIndex: 1,
top: 0,
left: 0,
right: 0,
bottom: 0
})
export const hairline = css({
borderTop: `1px solid ${colors.disabled}`,
marginTop: '7px',
width: '100%'
})
export const horizontalGroup = css({
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'flex-start',
alignItems: 'baseline',
alignContent: 'stretch',
'& > *': {
margin: '0 6px'
}
})