react-icons/hi#HiTicket JavaScript Examples

The following examples show how to use react-icons/hi#HiTicket. 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: Constants.js    From hackertab.dev with Apache License 2.0 5 votes vote down vote up
SUPPORTED_CARDS = [
  {
    value: 'github',
    icon: <SiGithub className="blockHeaderWhite" />,
    analyticsTag: 'repos',
    label: 'Github repositories',
    component: ReposCard,
  },
  {
    value: 'hackernews',
    icon: <SiYcombinator color="#FB6720" />,
    analyticsTag: 'hackernews',
    label: 'Hackernews',
    component: HNCard,
  },
  {
    value: 'conferences',
    icon: <HiTicket color="#4EC8AF" />,
    analyticsTag: 'events',
    label: 'Upcoming events',
    component: ConferencesCard,
  },
  {
    value: 'devto',
    icon: <FaDev className="blockHeaderWhite" />,
    analyticsTag: 'devto',
    label: 'DevTo',
    component: DevToCard,
  },
  {
    value: 'producthunt',
    icon: <SiProducthunt color="#D65736" />,
    analyticsTag: 'producthunt',
    label: 'Product Hunt',
    component: ProductHuntCard,
  },
  {
    value: 'reddit',
    icon: <FaReddit color="#FF4500" />,
    analyticsTag: 'reddit',
    label: 'Reddit',
    component: RedditCard,
  },
  {
    value: 'lobsters',
    icon: <img src={LobstersIcon} />,
    analyticsTag: 'lobsters',
    label: 'Lobsters',
    component: LobstersCard,
  },
  {
    value: 'hashnode',
    icon: <img src={HashNodeIcon} />,
    analyticsTag: 'hashnode',
    label: 'Hashnode',
    component: HashNodeCard,
  },
  {
    value: 'freecodecamp',
    icon: <FaFreeCodeCamp className="blockHeaderWhite" />,
    analyticsTag: 'freecodecamp',
    label: 'FreeCodeCamp',
    component: FreeCodeCampCard,
  },
]
Example #2
Source File: BookmarksSidebar.js    From hackertab.dev with Apache License 2.0 5 votes vote down vote up
function BookmarksSidebar({ showSidebar, onClose }) {

  const { userBookmarks = [] } = useContext(PreferencesContext)
  const githubBookmarks = userBookmarks.filter(bm => bm.source == "github")
  const jobsBookmarks = userBookmarks.filter(bm => bm.source == "jobs")
  const newsBookmarks = userBookmarks.filter(
    (bm) => ['hackernews', 'devto', 'hashnode', 'lobsters', 'freecodecamp'].indexOf(bm.source) != -1
  )
  const conferencesBookmarks = userBookmarks.filter(bm => bm.source == "conferences")
  const productsBookmarks = userBookmarks.filter(bm => bm.source == "producthunt")
  const redditBookmarks = userBookmarks.filter(bm => bm.source == "reddit")

  return (
    <ProSidebar className="sidebar"
      collapsed={!showSidebar}
      collapsedWidth={"0px"}
      width={"14%"}>
      <SidebarHeader>
        <div className="sidebarHeader">
          <span className="title">Bookmarks</span>
          <span className="closeBtn" onClick={onClose}><VscChromeClose /></span>
        </div>
      </SidebarHeader>
      <SidebarContent>
        <Menu iconShape="circle">

          <SubMenu
            title="Github Repos" icon={<SiGithub />}
            suffix={<span className="badge yellow">{githubBookmarks.length}</span>}
          >
            {
              githubBookmarks.map((bm, index) => (<BookmarkItem item={bm} key={`gh-${index}`} />))
            }

          </SubMenu>

          <SubMenu title="News & Articles" icon={<SiYcombinator />}
            suffix={<span className="badge yellow">{newsBookmarks.length}</span>}
          >
            {
              newsBookmarks.map((bm, index) => (<BookmarkItem item={bm} key={`ne-${index}`} />))
            }
          </SubMenu>

          <SubMenu
            title="Product Hunt" icon={<SiProducthunt />}
            suffix={<span className="badge yellow">{productsBookmarks.length}</span>}
          >
            {
              productsBookmarks.map((bm, index) => (<BookmarkItem item={bm} key={`gh-${index}`} appendRef={false} />))
            }

          </SubMenu>

          <SubMenu title="Conferences" icon={<HiTicket />}
            suffix={<span className="badge yellow">{conferencesBookmarks.length}</span>}
          >
            {
              conferencesBookmarks.map((bm, index) => (<BookmarkItem item={bm} key={`co-${index}`} />))
            }
          </SubMenu>
          <SubMenu title="Reddit" icon={<SiReddit />}
            suffix={<span className="badge yellow">{redditBookmarks.length}</span>}
          >
            {
              redditBookmarks.map((bm, index) => (<BookmarkItem item={bm} key={`co-${index}`} />))
            }
          </SubMenu>
        </Menu>
      </SidebarContent>
    </ProSidebar>
  )
}