Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 677
Add a new entry point as next and update draft Tooltip to export it from next#4250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
08a67d298a018adbb88593274ee5285900f2913c16b9962d22552c3cedb6ca26a0faeaFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': minor | ||
| --- | ||
| Add a new entry point 'next' and export the Tooltip v2 from it with an updated documentation |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,19 @@ | ||
| --- | ||
| componentId: tooltip_v2 | ||
| title: Tooltip v2 | ||
| status: Draft | ||
| source: https://github.com/primer/react/tree/main/packages/react/src/drafts/Tooltip.tsx | ||
| status: Beta | ||
| a11yReviewed: true | ||
| source: https://github.com/primer/react/tree/main/packages/react/src/TooltipV2/Tooltip.tsx | ||
| --- | ||
| import data from '../../../packages/react/src/drafts/Tooltip/Tooltip.docs.json' | ||
| import data from '../../packages/react/src/TooltipV2/Tooltip.docs.json' | ||
| ```js | ||
| //👇 Notice the new bundle, `next`👇 | ||
| import {Tooltip} from '@primer/react/next' | ||
broccolinisoup marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ``` | ||
| ## Usage | ||
| The Tooltip component is used to add context to interactive elements on the page. | ||
| @@ -23,7 +31,7 @@ Tooltip should only be used on an element that is interactive such as a button o | ||
| Default tooltip is suitable for interactive controls that require additional context. | ||
| ```jsx live | ||
| ```jsx live next | ||
| <Tooltip text="This change cannot be undone."> | ||
| <Button>Delete</Button> | ||
| </Tooltip> | ||
| @@ -33,7 +41,7 @@ Default tooltip is suitable for interactive controls that require additional con | ||
| Tooltip can be used to label interactive controls that has no visible text label such as interactive icon links. | ||
| ```jsx live | ||
| ```jsx live next | ||
| <Tooltip text="Contribution Documentation for 'Primer React'" type="label"> | ||
| <Link href="https://github.com/primer/react/contributor-docs/CONTRIBUTING.md" sx={{ml: 1, color: 'fg.muted'}}> | ||
| <Octicon icon={BookIcon} sx={{color: 'fg.muted'}} /> | ||
| @@ -43,7 +51,7 @@ Tooltip can be used to label interactive controls that has no visible text label | ||
| ### With direction | ||
| ```jsx live | ||
| ```jsx live next | ||
| <Box sx={{padding: 5, display: 'flex', gap: '8px'}}> | ||
| <Tooltip direction="n" text="Supplementary text"> | ||
| <Button>North</Button> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -146,6 +146,8 @@ | ||
| url: /Token | ||
| - title: Tooltip | ||
| url: /Tooltip | ||
| - title: Tooltip v2 | ||
broccolinisoup marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| url: /TooltipV2 | ||
| - title: TreeView | ||
| url: /TreeView | ||
| - title: Truncate | ||
| @@ -170,8 +172,6 @@ | ||
| url: /drafts/PageHeader | ||
| - title: SelectPanel v2 | ||
| url: /drafts/SelectPanel | ||
| - title: Tooltip v2 | ||
| url: /drafts/Tooltip | ||
| - title: Deprecated | ||
| children: | ||
| - title: ActionList (legacy) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "_comment1": "this is required only for typescript. once this is fixed https://github.com/microsoft/TypeScript/issues/33079 we can remove this hack", | ||
| "name": "@primer/react/next", | ||
| "types": "../lib-esm/next/index.d.ts", | ||
| "main": "../lib-esm/next/index.js", | ||
| "type": "module", | ||
| "sideEffects": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import React from 'react' | ||
| import {Button, IconButton, Breadcrumbs, ActionMenu, ActionList, NavList} from '../..' | ||
| import {PageHeader} from '../../PageHeader' | ||
| import {Button, IconButton, Breadcrumbs, ActionMenu, ActionList, NavList} from '..' | ||
| import {PageHeader} from '../PageHeader' | ||
| import {Tooltip} from './Tooltip' | ||
| import { | ||
| GitBranchIcon, | ||
| @@ -13,10 +13,10 @@ import { | ||
| CommentIcon, | ||
| XIcon, | ||
| } from '@primer/octicons-react' | ||
| import {default as VisuallyHidden} from '../../_VisuallyHidden' | ||
| import {default as VisuallyHidden} from '../_VisuallyHidden' | ||
| export default { | ||
| title: 'Drafts/Components/Tooltip/Examples', | ||
| title: 'Components/TooltipV2/Examples', | ||
broccolinisoup marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. broccolinisoup marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| component: Tooltip, | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.