Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useState, useEffect, useRef, ReactNode, RefObject } from 'react'
import { useRouter } from 'next/router'
import useSWR from 'swr'
import cx from 'classnames'
import { ActionList, DropdownMenu, Flash, Label, Overlay } from '@primer/components'
import { ItemInput } from '@primer/components/lib/ActionList/List'
import { ActionList, DropdownMenu, Flash, Label, Overlay } from '@primer/react'
import { ItemInput } from '@primer/react/lib/ActionList/List'

import { useTranslation } from 'components/hooks/useTranslation'
import { sendEvent, EventType } from 'components/lib/events'
Expand Down
2 changes: 1 addition & 1 deletion components/article/ArticleGridLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
import { Box, themeGet } from '@primer/components'
import { Box, themeGet } from '@primer/react'

type Props = {
intro?: React.ReactNode
Expand Down
2 changes: 1 addition & 1 deletion components/article/ArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'
import cx from 'classnames'
import { ActionList, Heading } from '@primer/components'
import { ActionList, Heading } from '@primer/react'

import { ZapIcon, InfoIcon, ShieldLockIcon } from '@primer/octicons-react'
import { Callout } from 'components/ui/Callout'
Expand Down
2 changes: 1 addition & 1 deletion components/article/PlatformPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import Cookies from 'js-cookie'
import { SubNav, TabNav, UnderlineNav } from '@primer/components'
import { SubNav, TabNav, UnderlineNav } from '@primer/react'
import { sendEvent, EventType } from 'components/lib/events'
import { useRouter } from 'next/router'

Expand Down
2 changes: 1 addition & 1 deletion components/article/ToolPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import Cookies from 'js-cookie'
import { UnderlineNav } from '@primer/components'
import { UnderlineNav } from '@primer/react'
import { sendEvent, EventType } from 'components/lib/events'
import { preserveAnchorNodePosition } from 'scroll-anchoring'

Expand Down
2 changes: 1 addition & 1 deletion components/guides/ArticleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArticleGuide } from 'components/context/ProductGuidesContext'
import { Label } from '@primer/components'
import { Label } from '@primer/react'

type Props = {
card: ArticleGuide
Expand Down
4 changes: 2 additions & 2 deletions components/guides/ArticleCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React, { useEffect, useRef, useState } from 'react'
import { ArticleGuide, useProductGuidesContext } from 'components/context/ProductGuidesContext'
import { useTranslation } from 'components/hooks/useTranslation'
import { ArticleCard } from './ArticleCard'
import { DropdownMenu } from '@primer/components'
import { ItemInput } from '@primer/components/lib/ActionList/List'
import { DropdownMenu } from '@primer/react'
import { ItemInput } from '@primer/react/lib/ActionList/List'

const PAGE_SIZE = 9
export const ArticleCards = () => {
Expand Down
2 changes: 1 addition & 1 deletion components/guides/LearningTrack.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import cx from 'classnames'
import { useTranslation } from 'components/hooks/useTranslation'
import { ArrowRightIcon } from '@primer/octicons-react'
import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'
import { useState } from 'react'
import { FeaturedTrack } from 'components/context/ProductGuidesContext'
import { TruncateLines } from 'components/ui/TruncateLines'
Expand Down
2 changes: 1 addition & 1 deletion components/hooks/useBreakpoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useTheme } from '@primer/components'
import { useTheme } from '@primer/react'

import { useMediaQuery } from './useMediaQuery'

Expand Down
2 changes: 1 addition & 1 deletion components/landing/ArticleList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cx from 'classnames'
import dayjs from 'dayjs'
import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'
import { useTranslation } from 'components/hooks/useTranslation'
import { Link } from 'components/Link'
import { ArrowRightIcon } from '@primer/octicons-react'
Expand Down
2 changes: 1 addition & 1 deletion components/landing/CodeExampleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RepoIcon } from '@primer/octicons-react'
import { CodeExample } from 'components/context/ProductLandingContext'
import { TruncateLines } from 'components/ui/TruncateLines'
import { Label } from '@primer/components'
import { Label } from '@primer/react'

type Props = {
example: CodeExample
Expand Down
2 changes: 1 addition & 1 deletion components/landing/CodeExamples.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import { ArrowRightIcon, SearchIcon } from '@primer/octicons-react'
import { Text } from '@primer/components'
import { Text } from '@primer/react'

import { useProductLandingContext } from 'components/context/ProductLandingContext'
import { useTranslation } from 'components/hooks/useTranslation'
Expand Down
2 changes: 1 addition & 1 deletion components/landing/ProductArticlesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import cx from 'classnames'
import { useState } from 'react'

import { ChevronDownIcon } from '@primer/octicons-react'
import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'

import { ProductTreeNode, useMainContext } from 'components/context/MainContext'
import { Link } from 'components/Link'
Expand Down
2 changes: 1 addition & 1 deletion components/landing/TableOfContents.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRouter } from 'next/router'
import cx from 'classnames'

import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'
import { Link } from 'components/Link'
import { BumpLink } from 'components/ui/BumpLink'
import type { TocItem } from 'components/context/ProductLandingContext'
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/DeprecationBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMainContext } from 'components/context/MainContext'
import { useVersion } from 'components/hooks/useVersion'
import { Flash } from '@primer/components'
import { Flash } from '@primer/react'

export const DeprecationBanner = () => {
const { data, enterpriseServerReleases } = useMainContext()
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/RestBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Flash } from '@primer/components'
import { Flash } from '@primer/react'
import { useRouter } from 'next/router'
import { Link } from 'components/Link'

Expand Down
2 changes: 1 addition & 1 deletion components/playground/ArticleMarkdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import cx from 'classnames'
import { useTheme } from '@primer/components'
import { useTheme } from '@primer/react'
import ReactMarkdown from 'react-markdown'
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import { vs, vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism'
Expand Down
2 changes: 1 addition & 1 deletion components/playground/CodeLanguagePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SelectMenu, Button, Dropdown } from '@primer/components'
import { SelectMenu, Button, Dropdown } from '@primer/react'
import { Link } from 'components/Link'
import { useRouter } from 'next/router'
import { usePlaygroundContext } from 'components/context/PlaygroundContext'
Expand Down
2 changes: 1 addition & 1 deletion components/playground/editor/ActionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CopyIcon, CheckIcon } from '@primer/octicons-react'
import { Tooltip } from '@primer/components'
import { Tooltip } from '@primer/react'

import useClipboard from 'components/hooks/useClipboard'

Expand Down
2 changes: 1 addition & 1 deletion components/playground/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LoadingIndicator } from './LoadingIndicator'
import { ActionBar } from './ActionBar'

import { CodeBlockRef, PlaygroundArticleT } from '../types'
import { useTheme } from '@primer/components'
import { useTheme } from '@primer/react'

const getNormalizedHighlight = (
highlight: Exclude<CodeBlockRef['highlight'], undefined>
Expand Down
2 changes: 1 addition & 1 deletion components/playground/editor/LoadingIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text } from '@primer/components'
import { Box, Text } from '@primer/react'

export function LoadingIndicator() {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/sidebar/SidebarHomepage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router'
import { LinkExternalIcon } from '@primer/octicons-react'
import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'

import { useVersion } from 'components/hooks/useVersion'
import { useMainContext } from 'components/context/MainContext'
Expand Down
2 changes: 1 addition & 1 deletion components/sidebar/SidebarProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRouter } from 'next/router'
import cx from 'classnames'
import { useState, useEffect, SyntheticEvent } from 'react'
import { ChevronDownIcon } from '@primer/octicons-react'
import { ActionList } from '@primer/components'
import { ActionList } from '@primer/react'

import { Link } from 'components/Link'
import { ProductTreeNode, useMainContext } from 'components/context/MainContext'
Expand Down
2 changes: 1 addition & 1 deletion components/ui/Picker/Picker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ReactNode } from 'react'
import cx from 'classnames'

import { Details, useDetails, Text, Dropdown, Box } from '@primer/components'
import { Details, useDetails, Text, Dropdown, Box } from '@primer/react'
import { ChevronDownIcon } from '@primer/octicons-react'

export type PickerOptionsTypeT = {
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ module.exports = {
},
},
preset: isBrowser ? 'jest-puppeteer' : undefined,
moduleNameMapper: {
// fix for "Unexpected token 'export'" error when running jest
'@primer/behaviors': '<rootDir>/node_modules/@primer/behaviors/dist/cjs/index.js',
},
reporters,
modulePathIgnorePatterns: ['assets/'],
setupFilesAfterEnv: ['@alex_neo/jest-expect-message'],
Expand Down
2 changes: 1 addition & 1 deletion ownership.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 1
ownership:
- name: docs-internal
long_name: GitHub Help Docs
kind: heroku
kind: logical
repo: https://github.com/github/docs-internal
team: github/docs-engineering
maintainer: chiedo
Expand Down
Loading