How to use the gatsby-theme-apollo-core/src/utils/colors.colors.hoverOpacity function in gatsby-theme-apollo-core

To help you get started, we’ve selected a few gatsby-theme-apollo-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wp-graphql / wp-graphql / docs / src / gatsby-theme-apollo-core / components / sidebar-nav / index.js View on Github external
import { IconExpandList } from '@apollo/space-kit/icons/IconExpandList'
import { Link, withPrefix } from 'gatsby'
import { colors } from 'gatsby-theme-apollo-core/src/utils/colors'
import { size } from 'polished'
import { smallCaps } from 'gatsby-theme-apollo-core/src/utils/typography'
import wpgqlColors from '../../../utils/colors'

const StyledList = styled.ul({
  marginLeft: 0,
  listStyle: 'none',
})

const listItemStyles = {
  color: 'inherit',
  ':hover': {
    opacity: colors.hoverOpacity,
  },
}

const StyledListItem = styled.li({
  fontSize: '1rem',
  lineHeight: 'inherit',
  a: {
    ...listItemStyles,
    textDecoration: 'none',
    '&.active': {
      color: wpgqlColors.primary,
      pointerEvents: 'none',
    },
  },
})
github wp-graphql / wp-graphql / docs / src / gatsby-theme-apollo-core / components / sidebar-nav / category.js View on Github external
},
  '&.active': {
    color: colors.primary,
  },
}

const Container = styled.div(props => ({
  borderTop: !props.first && `1px solid ${colors.divider}`,
  marginTop: props.first && headingPadding / -2,
}))

const StyledButton = styled.button(headingStyles, {
  ':not([disabled])': {
    cursor: 'pointer',
    ':hover': {
      opacity: colors.hoverOpacity,
    },
  },
})

const StyledLink = styled(Link)(headingStyles, {
  textDecoration: 'none',
})

export default function Category(props) {
  const Icon = props.expanded ? IconArrowUp : IconArrowDown
  const contents = (
    
      <h6>{props.title}</h6>