react-icons/fa#FaCircle JavaScript Examples

The following examples show how to use react-icons/fa#FaCircle. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CartLink.js    From jamstack-ecommerce with MIT License 6 votes vote down vote up
render() {
    let { context: { numberOfItemsInCart } = { numberOfItemsInCart: 0 } } = this.props
    return (
      <div>
        <div className="fixed top-49 right-20 desktop:right-flexiblemargin z-10">
          <div className="flex flex-1 justify-end pr-4 relative">
            <Link to="/cart">
              <FaShoppingCart />
            </Link>
            {
              numberOfItemsInCart > Number(0) && (
                <div>
                  <FaCircle color={secondary} size={12} />
                </div>
              )
            }
          </div>
        </div>
      </div>
    )
  }
Example #2
Source File: Nav.js    From jamstack-ecommerce with MIT License 6 votes vote down vote up
render() {
    let { numberOfItemsInCart, navItems: { navInfo: { data: links }}} = this.props.context
  
    links = links.map(link => {
      const newLink = {}
      newLink.link = slugify(link)
      newLink.name = titleIfy(link)
      return newLink
    })
    links.unshift({ name: 'Home', link: '/'})
    return (
      <>
      <div className="flex">
        {
          links.map((l, i) => (
            <Link to={l.link} key={i}>
              <p key={i} className="text-left m-0 text-smaller mr-4 sm:mr-8 font-semibold">{l.name}</p>
            </Link>
          ))
        }
      </div>
      <div className="flex flex-1 justify-end pr-4 relative">
        <Link to="/cart">
          <FaShoppingCart />
        </Link>
        {
          numberOfItemsInCart > Number(0) && (
            <div>
              <FaCircle />
            </div>
          )
        }
    </div>
      </>
    )
  }
Example #3
Source File: Nav.js    From jamstack-ecommerce with MIT License 6 votes vote down vote up
render() {
    let { numberOfItemsInCart, navItems: { navInfo: { data: links }}} = this.props.context

    links = links.map(link => {
      const newLink = {}
      newLink.link = slugify(link)
      newLink.name = titleIfy(link)
      return newLink
    })
    links.unshift({ name: 'Home', link: '/'})
    return (
      <>
      <div className="flex">
        {
          links.map((l, i) => (
            <Link to={l.link} key={i}>
              <p key={i} className="text-left m-0 text-smaller mr-4 sm:mr-8 font-semibold">{l.name}</p>
            </Link>
          ))
        }
      </div>
      <div className="flex flex-1 justify-end pr-4 relative">
        <Link to="/cart">
          <FaShoppingCart />
        </Link>
        {
          numberOfItemsInCart > Number(0) && (
            <div>
              <FaCircle />
            </div>
          )
        }
    </div>
      </>
    )
  }
Example #4
Source File: flip-editor-tools.js    From idena-web with MIT License 5 votes vote down vote up
export function ColorPicker({visible, color, onChange}) {
  const colorPickerRef = useRef()
  const colors = [
    ['ffffff', 'd2d4d9e0', '96999edd', '53565cdd'],
    ['ff6666dd', 'ff60e7dd', 'a066ffdd', '578fffdd'],
    ['0cbdd0dd', '27d980dd', 'ffd763dd', 'ffa366dd'],
  ]

  useClickOutside(colorPickerRef, () => {
    onChange(color)
  })

  return (
    <div
      style={{
        display: `${visible ? '' : 'none'}`,
      }}
    >
      <Box css={position('relative')} ref={colorPickerRef}>
        <Absolute top={0} right={rem(40)} zIndex={100}>
          <Menu>
            {colors.map((row, i) => (
              <Flex key={i} css={{marginLeft: rem(10), marginRight: rem(10)}}>
                {row.map((c, j) => {
                  const showColor = c === 'ffffff' ? '#d2d4d9' : `#${c}`
                  const circleStyle = {
                    padding: rem(1),
                    border: `${color === c ? '1px' : '0px'} solid ${showColor}`,
                    borderRadius: '50%',
                    fontSize: theme.fontSizes.large,
                  }
                  return (
                    <IconButton
                      key={`${j}${j}`}
                      icon={
                        c === 'ffffff' ? (
                          <FiCircle color={showColor} style={circleStyle} />
                        ) : (
                          <FaCircle color={showColor} style={circleStyle} />
                        )
                      }
                      onClick={() => {
                        if (onChange) {
                          onChange(c)
                        }
                      }}
                    ></IconButton>
                  )
                })}
              </Flex>
            ))}
          </Menu>
        </Absolute>
      </Box>
    </div>
  )
}