@atlaskit/atlassian-navigation 2.6.14 → 2.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/AtlassianNavigation/index.js +3 -3
  3. package/dist/cjs/components/AtlassianNavigation/skeleton.js +3 -3
  4. package/dist/cjs/components/Create/index.js +3 -3
  5. package/dist/cjs/components/PrimaryButton/index.js +1 -1
  6. package/dist/cjs/components/PrimaryDropdownButton/index.js +5 -5
  7. package/dist/cjs/components/PrimaryItemsContainer/index.js +1 -1
  8. package/dist/cjs/components/PrimaryItemsContainerV2/index.js +83 -43
  9. package/dist/cjs/components/ProductHome/custom-product-home.js +1 -1
  10. package/dist/cjs/components/ProductHome/product-home.js +14 -6
  11. package/dist/cjs/components/ProductHome/skeleton.js +3 -3
  12. package/dist/cjs/components/SkeletonCreateButton/index.js +1 -1
  13. package/dist/cjs/components/SkeletonIconButton/index.js +2 -2
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/components/AtlassianNavigation/index.js +3 -3
  16. package/dist/es2019/components/AtlassianNavigation/skeleton.js +3 -3
  17. package/dist/es2019/components/Create/index.js +5 -5
  18. package/dist/es2019/components/Create/skeleton.js +1 -1
  19. package/dist/es2019/components/PrimaryButton/index.js +1 -1
  20. package/dist/es2019/components/PrimaryDropdownButton/index.js +6 -6
  21. package/dist/es2019/components/PrimaryItemsContainer/index.js +1 -1
  22. package/dist/es2019/components/PrimaryItemsContainerV2/index.js +68 -44
  23. package/dist/es2019/components/ProductHome/custom-product-home.js +6 -6
  24. package/dist/es2019/components/ProductHome/product-home.js +18 -11
  25. package/dist/es2019/components/ProductHome/skeleton.js +7 -7
  26. package/dist/es2019/components/Search/index.js +2 -2
  27. package/dist/es2019/components/Search/skeleton.js +2 -2
  28. package/dist/es2019/components/SkeletonCreateButton/index.js +1 -1
  29. package/dist/es2019/components/SkeletonIconButton/index.js +2 -2
  30. package/dist/es2019/version.json +1 -1
  31. package/dist/esm/components/AtlassianNavigation/index.js +3 -3
  32. package/dist/esm/components/AtlassianNavigation/skeleton.js +3 -3
  33. package/dist/esm/components/Create/index.js +3 -3
  34. package/dist/esm/components/PrimaryButton/index.js +1 -1
  35. package/dist/esm/components/PrimaryDropdownButton/index.js +6 -6
  36. package/dist/esm/components/PrimaryItemsContainer/index.js +1 -1
  37. package/dist/esm/components/PrimaryItemsContainerV2/index.js +85 -45
  38. package/dist/esm/components/ProductHome/custom-product-home.js +1 -1
  39. package/dist/esm/components/ProductHome/product-home.js +14 -6
  40. package/dist/esm/components/ProductHome/skeleton.js +3 -3
  41. package/dist/esm/components/SkeletonCreateButton/index.js +1 -1
  42. package/dist/esm/components/SkeletonIconButton/index.js +2 -2
  43. package/dist/esm/version.json +1 -1
  44. package/dist/types/components/PrimaryItemsContainerV2/index.d.ts +1 -3
  45. package/dist/types-ts4.5/components/PrimaryItemsContainerV2/index.d.ts +1 -3
  46. package/package.json +3 -3
  47. package/tmp/api-report-tmp.d.ts +325 -0
  48. package/__perf__/default.tsx +0 -14
  49. package/docs/01-intro.tsx +0 -46
  50. package/docs/02-atlassian-navigation.tsx +0 -38
  51. package/docs/03-product-home.tsx +0 -73
  52. package/docs/04-app-switcher.tsx +0 -29
  53. package/docs/05-create.tsx +0 -37
  54. package/docs/06-primary-actions.tsx +0 -64
  55. package/docs/07-secondary-actions.tsx +0 -206
  56. package/docs/96-skeleton-buttons.tsx +0 -88
  57. package/docs/97-theming.tsx +0 -45
  58. package/docs/98-overflow-menu.tsx +0 -49
  59. package/docs/99-migrating-from-navigation-next.tsx +0 -52
  60. package/docs/ert/skeleton-create-button.tsx +0 -3
  61. package/docs/ert/skeleton-icon-button.tsx +0 -3
  62. package/docs/ert/skeleton-primary-button.tsx +0 -3
  63. package/docs/ert/skeleton-switcher-button.tsx +0 -3
@@ -0,0 +1,325 @@
1
+ ## API Report File for "@atlaskit/atlassian-navigation"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="lodash" />
8
+ /// <reference types="react" />
9
+
10
+ import { AllHTMLAttributes } from 'react';
11
+ import { ComponentType } from 'react';
12
+ import { CSSObject } from '@emotion/react';
13
+ import { CustomThemeButtonProps } from '@atlaskit/button/types';
14
+ import { CustomThemeButtonProps as CustomThemeButtonProps_2 } from '@atlaskit/button/custom-theme-button';
15
+ import { ElementType } from 'react';
16
+ import { ForwardRefExoticComponent } from 'react';
17
+ import { jsx } from '@emotion/react';
18
+ import { LogoProps } from '@atlaskit/logo';
19
+ import { MouseEvent as MouseEvent_2 } from 'react';
20
+ import noop from '@atlaskit/ds-lib/noop';
21
+ import { Provider } from 'react';
22
+ import { default as React_2 } from 'react';
23
+ import { ReactChild } from 'react';
24
+ import { ReactNode } from 'react';
25
+ import { ReactNodeArray } from 'react';
26
+ import { RefAttributes } from 'react';
27
+ import { ThemeProps } from '@atlaskit/button/custom-theme-button';
28
+ import { ThemeProps as ThemeProps_2 } from '@atlaskit/button';
29
+ import { ThemeTokens } from '@atlaskit/button/custom-theme-button';
30
+ import { ThemeTokens as ThemeTokens_2 } from '@atlaskit/button';
31
+
32
+ // @public
33
+ export const AppSwitcher: React_2.ForwardRefExoticComponent<BaseIconButtonProps & React_2.RefAttributes<any>>;
34
+
35
+ // @public (undocumented)
36
+ export type AppSwitcherProps = BaseIconButtonProps;
37
+
38
+ // @public
39
+ export const AtlassianNavigation: (props: AtlassianNavigationProps) => jsx.JSX.Element;
40
+
41
+ // @public (undocumented)
42
+ export interface AtlassianNavigationProps {
43
+ label: string;
44
+ moreLabel?: ReactNode;
45
+ primaryItems: ReactNodeArray;
46
+ renderAppSwitcher?: React_2.ComponentType<{}>;
47
+ renderCreate?: React_2.ComponentType<{}>;
48
+ renderHelp?: React_2.ComponentType<{}>;
49
+ renderNotifications?: React_2.ComponentType<{}>;
50
+ renderProductHome: React_2.ComponentType<{}>;
51
+ renderProfile?: React_2.ComponentType<{}>;
52
+ renderSearch?: React_2.ComponentType<{}>;
53
+ renderSettings?: React_2.ComponentType<{}>;
54
+ renderSignIn?: React_2.ComponentType<{}>;
55
+ testId?: string;
56
+ theme?: NavigationTheme;
57
+ }
58
+
59
+ // @public (undocumented)
60
+ export const atlassianTheme: NavigationTheme;
61
+
62
+ // @public
63
+ interface BaseIconButtonProps {
64
+ component?: CustomThemeButtonProps['component'];
65
+ href?: string;
66
+ id?: string;
67
+ isDisabled?: boolean;
68
+ isSelected?: boolean;
69
+ onBlur?: React.FocusEventHandler<HTMLElement>;
70
+ onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
71
+ onFocus?: React.FocusEventHandler<HTMLElement>;
72
+ onMouseDown?: React.MouseEventHandler<HTMLElement>;
73
+ onMouseEnter?: React.MouseEventHandler<HTMLElement>;
74
+ onMouseLeave?: React.MouseEventHandler<HTMLElement>;
75
+ onMouseUp?: React.MouseEventHandler<HTMLElement>;
76
+ target?: string;
77
+ testId?: string;
78
+ tooltip: React.ReactNode;
79
+ }
80
+
81
+ // @public (undocumented)
82
+ type ButtonCSSContext = {
83
+ default: ButtonCSSProperties;
84
+ hover: ButtonCSSProperties;
85
+ focus: ButtonCSSProperties;
86
+ active: ButtonCSSProperties;
87
+ selected: ButtonCSSProperties;
88
+ selectedHover?: ButtonCSSProperties;
89
+ };
90
+
91
+ // @public (undocumented)
92
+ type ButtonCSSProperties = CSSProperties & {
93
+ boxShadow: string;
94
+ };
95
+
96
+ // @public (undocumented)
97
+ export type Colors = {
98
+ backgroundColor: string;
99
+ color: string;
100
+ };
101
+
102
+ // @public
103
+ export const Create: ({ onClick, href, text, buttonTooltip, iconButtonTooltip, testId, }: CreateProps) => jsx.JSX.Element;
104
+
105
+ // @public (undocumented)
106
+ export type CreateCSS = ButtonCSSContext;
107
+
108
+ // @public (undocumented)
109
+ export interface CreateProps {
110
+ buttonTooltip?: React_2.ReactNode;
111
+ href?: string;
112
+ iconButtonTooltip?: React_2.ReactNode;
113
+ onClick?: (e: React_2.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
114
+ testId?: string;
115
+ text: string;
116
+ }
117
+
118
+ // @public (undocumented)
119
+ type CSSProperties = CSSObject & {
120
+ backgroundColor: string;
121
+ color: string;
122
+ };
123
+
124
+ // @public
125
+ export const CustomProductHome: (props: CustomProductHomeProps) => jsx.JSX.Element;
126
+
127
+ // @public (undocumented)
128
+ export interface CustomProductHomeProps {
129
+ href?: string;
130
+ iconAlt: string;
131
+ iconUrl: string;
132
+ logoAlt: string;
133
+ logoMaxWidth?: number;
134
+ logoUrl: string;
135
+ onClick?: (event: MouseEvent_2<HTMLElement>) => void;
136
+ onMouseDown?: (event: MouseEvent_2<HTMLElement>) => void;
137
+ siteTitle?: string;
138
+ testId?: string;
139
+ }
140
+
141
+ // @public (undocumented)
142
+ export const generateTheme: (themeColors: GenerateThemeArgs) => NavigationTheme;
143
+
144
+ // @public (undocumented)
145
+ export type GenerateThemeArgs = {
146
+ name?: string;
147
+ backgroundColor: string;
148
+ highlightColor: string;
149
+ };
150
+
151
+ // @public
152
+ export const Help: React_2.ForwardRefExoticComponent<BaseIconButtonProps & {
153
+ badge?: React_2.ComponentType<{}> | undefined;
154
+ } & React_2.RefAttributes<any>>;
155
+
156
+ // @public (undocumented)
157
+ export type HelpProps = BaseIconButtonProps & {
158
+ badge?: ComponentType<{}>;
159
+ };
160
+
161
+ // @public (undocumented)
162
+ export const HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
163
+
164
+ // @public
165
+ export const IconButton: React_2.ForwardRefExoticComponent<BaseIconButtonProps & {
166
+ icon: React_2.ReactChild | undefined;
167
+ theme?: ((current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens) | undefined;
168
+ } & React_2.RefAttributes<HTMLElement>>;
169
+
170
+ // @public (undocumented)
171
+ export type IconButtonCSS = ButtonCSSContext;
172
+
173
+ // @public (undocumented)
174
+ export type IconButtonProps = BaseIconButtonProps & {
175
+ icon: CustomThemeButtonProps['iconBefore'];
176
+ theme?: CustomThemeButtonProps['theme'];
177
+ };
178
+
179
+ // @public (undocumented)
180
+ type LogoStyleProps = {
181
+ iconGradientStart?: string;
182
+ iconGradientStop?: string;
183
+ iconColor?: string;
184
+ textColor?: string;
185
+ };
186
+
187
+ // @public (undocumented)
188
+ export type Mode = {
189
+ create: CreateCSS;
190
+ iconButton: IconButtonCSS;
191
+ navigation: NavigationCSS;
192
+ primaryButton: PrimaryButtonCSS;
193
+ productHome: ProductHomeCSS;
194
+ search: SearchCSS;
195
+ skeleton: SkeletonCSS;
196
+ };
197
+
198
+ // @public (undocumented)
199
+ export type NavigationCSS = CSSProperties;
200
+
201
+ // @public (undocumented)
202
+ export type NavigationTheme = {
203
+ mode: Mode;
204
+ };
205
+
206
+ // @public
207
+ export const Notifications: React_2.ForwardRefExoticComponent<BaseIconButtonProps & {
208
+ badge: React_2.ComponentType<{}>;
209
+ } & React_2.RefAttributes<any>>;
210
+
211
+ // @public (undocumented)
212
+ export type NotificationsProps = BaseIconButtonProps & {
213
+ badge: ComponentType<{}>;
214
+ };
215
+
216
+ // @public
217
+ export const PrimaryButton: ForwardRefExoticComponent<Omit<CustomThemeButtonProps_2, "appearance" | "onClick"> & {
218
+ component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any> | undefined;
219
+ isHighlighted?: boolean | undefined;
220
+ testId?: string | undefined;
221
+ tooltip?: ReactNode;
222
+ onClick?: ((event: MouseEvent_2<HTMLElement, MouseEvent>, analyticsEvent: any) => void) | undefined;
223
+ } & RefAttributes<HTMLElement>>;
224
+
225
+ // @public (undocumented)
226
+ export type PrimaryButtonCSS = ButtonCSSContext;
227
+
228
+ // @public (undocumented)
229
+ export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
230
+ component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any>;
231
+ isHighlighted?: boolean;
232
+ testId?: string;
233
+ tooltip?: React.ReactNode;
234
+ onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
235
+ };
236
+
237
+ // @public
238
+ export const PrimaryDropdownButton: ForwardRefExoticComponent<Omit<PrimaryButtonProps, "iconAfter"> & {
239
+ isHighlighted?: boolean | undefined;
240
+ testId?: string | undefined;
241
+ tooltip?: ReactNode;
242
+ } & RefAttributes<HTMLElement>>;
243
+
244
+ // @public (undocumented)
245
+ export type PrimaryDropdownButtonProps = Omit<PrimaryButtonProps, 'iconAfter'> & {
246
+ isHighlighted?: boolean;
247
+ testId?: string;
248
+ tooltip?: React.ReactNode;
249
+ };
250
+
251
+ // @public
252
+ export const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, ...rest }: ProductHomeProps) => jsx.JSX.Element;
253
+
254
+ // @public (undocumented)
255
+ type ProductHomeCSS = CSSProperties & LogoStyleProps;
256
+
257
+ // @public (undocumented)
258
+ export interface ProductHomeProps {
259
+ href?: string;
260
+ icon: ComponentType<Partial<LogoProps>>;
261
+ logo: ComponentType<Partial<LogoProps>>;
262
+ logoMaxWidth?: number;
263
+ onClick?: (event: MouseEvent_2<HTMLElement>) => void;
264
+ onMouseDown?: (event: MouseEvent_2<HTMLElement>) => void;
265
+ siteTitle?: string;
266
+ testId?: string;
267
+ }
268
+
269
+ // @public
270
+ export const Profile: ForwardRefExoticComponent<BaseIconButtonProps & {
271
+ icon: ReactChild | undefined;
272
+ theme?: ((current: (props: ThemeProps_2) => ThemeTokens_2, props: ThemeProps_2) => ThemeTokens_2) | undefined;
273
+ } & RefAttributes<HTMLElement>>;
274
+
275
+ // @public (undocumented)
276
+ export type ProfileProps = IconButtonProps;
277
+
278
+ // @public
279
+ export const Search: (props: SearchProps) => jsx.JSX.Element;
280
+
281
+ // @public (undocumented)
282
+ export type SearchCSS = {
283
+ default: CSSProperties;
284
+ focus: CSSObject;
285
+ hover: CSSObject;
286
+ };
287
+
288
+ // @public (undocumented)
289
+ export type SearchProps = BaseIconButtonProps & {
290
+ placeholder: string;
291
+ label: string;
292
+ value?: string;
293
+ };
294
+
295
+ // @public
296
+ export const Settings: React_2.ForwardRefExoticComponent<BaseIconButtonProps & React_2.RefAttributes<any>>;
297
+
298
+ // @public (undocumented)
299
+ export type SettingsProps = BaseIconButtonProps;
300
+
301
+ // @public
302
+ export const SignIn: (props: SignInProps) => JSX.Element;
303
+
304
+ // @public (undocumented)
305
+ export type SignInProps = BaseIconButtonProps;
306
+
307
+ // @public (undocumented)
308
+ export type SkeletonCSS = CSSObject & {
309
+ backgroundColor: string;
310
+ opacity: number;
311
+ };
312
+
313
+ // @public
314
+ export const ThemeProvider: Provider<NavigationTheme>;
315
+
316
+ // @public
317
+ export const useOverflowStatus: () => {
318
+ isVisible: boolean;
319
+ openOverflowMenu: typeof noop;
320
+ closeOverflowMenu: typeof noop;
321
+ };
322
+
323
+ // (No @packageDocumentation comment for this package)
324
+
325
+ ```
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
-
3
- import { AtlassianNavigation, Settings } from '../src';
4
-
5
- const DefaultSettings = () => <Settings tooltip="Product settings" />;
6
-
7
- export default () => (
8
- <AtlassianNavigation
9
- label="site"
10
- renderProductHome={() => null}
11
- renderSettings={DefaultSettings}
12
- primaryItems={[]}
13
- />
14
- );
package/docs/01-intro.tsx DELETED
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md } from '@atlaskit/docs';
4
-
5
- export default md`
6
-
7
- ## Documentation
8
-
9
- All the documentation can be found in the **sidebar nav links** 👈
10
-
11
- - [Atlassian navigation](atlassian-navigation/docs/atlassian-navigation)
12
- - [Product home](atlassian-navigation/docs/product-home)
13
- - [App switcher](atlassian-navigation/docs/app-switcher)
14
- - [Create](atlassian-navigation/docs/create)
15
- - [Primary actions](atlassian-navigation/docs/primary-actions)
16
- - [Secondary actions](atlassian-navigation/docs/secondary-actions)
17
- - [Theming](atlassian-navigation/docs/theming)
18
- - [Overflow menu](atlassian-navigation/docs/overflow-menu)
19
- - [Migrating from navigation-next](atlassian-navigation/docs/migrating-from-navigation-next)
20
-
21
- ## Usage
22
-
23
- ${code`
24
- import React, { useState } from 'react';
25
- import { AtlassianNavigation, ProductHome, PrimaryButton } from '../src';
26
-
27
- const AtlassianHome = () => (
28
- <ProductHome icon={AtlassianIcon} logo={AtlassianLogo} />
29
- );
30
-
31
- <AtlassianNavigation
32
- renderProductHome={AtlassianHome}
33
- primaryItems={[
34
- <PrimaryButton>Issues</PrimaryButton>
35
- ]}
36
- />
37
- `}
38
-
39
- ${(
40
- <Example
41
- title="Atlassian navigation"
42
- Component={require('../examples/barebones').default}
43
- source={require('!!raw-loader!../examples/barebones')}
44
- />
45
- )}
46
- `;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md, Props } from '@atlaskit/docs';
4
-
5
- export default md`
6
- The primary component that will render the horizontal navigation.
7
- Compose with other components like [product home](product-home),
8
- [create](create),
9
- [primary button](primary-button),
10
- and more to build up your navigation experience.
11
-
12
- ${code`
13
- import { AtlassianNavigation } from '@atlaskit/atlassian-navigation';
14
-
15
- <AtlassianNavigation
16
- primaryItems={[
17
- <PrimaryButton>Issues</PrimaryButton>,
18
- <ExploreDropdown />,
19
- ]}
20
- renderProductHome={ProductHomeExample}
21
- />
22
- `}
23
-
24
- ${(
25
- <Example
26
- title="Atlassian navigation"
27
- Component={require('../examples/barebones').default}
28
- source={require('!!raw-loader!../examples/barebones')}
29
- />
30
- )}
31
-
32
- ${(
33
- <Props
34
- heading="Props"
35
- props={require('!!extract-react-types-loader!../src/components/AtlassianNavigation')}
36
- />
37
- )}
38
- `;
@@ -1,73 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md, Props } from '@atlaskit/docs';
4
-
5
- export default md`
6
- To be composed with [Atlassian navigation](atlassian-navigation).
7
- Will render the logo or icon for the consuming product while handling responsive viewports.
8
-
9
- Defining navigation for a product that does not have a logo inside [\`@atlaskit/logo\`](/packages/design-system/logo) or wanting to use a custom logo?
10
- You'll want to create use the **custom product home** component further below.
11
-
12
- ${code`
13
- import { ProductHome } from '@atlaskit/atlassian-navigation';
14
- import { AtlassianLogo, AtlassianIcon } from '@atlaskit/logo';
15
-
16
- <ProductHome icon={AtlassianIcon} logo={AtlassianLogo} />
17
- `}
18
-
19
- ${(
20
- <Example
21
- title="Product home"
22
- Component={require('../examples/product-home').default}
23
- source={require('!!raw-loader!../examples/product-home')}
24
- />
25
- )}
26
-
27
- ${(
28
- <Props
29
- heading="Props"
30
- props={require('!!extract-react-types-loader!../src/components/ProductHome/product-home')}
31
- />
32
- )}
33
-
34
- ## Custom product home
35
-
36
- If you're making a custom product that doesn't have a readily available logo you'll want to use the custom product home component.
37
-
38
- Are you defining navigation for a product that exists inside [\`@atlaskit/logo\`](/packages/design-system/logo)?
39
- You'll want to use the **product home component** above.
40
-
41
- ${code`
42
- import { CustomProductHome } from '@atlaskit/atlassian-navigation';
43
- import icon from './shared/assets/atlassian-icon.png';
44
- import logo from './shared/assets/atlassian-logo.png';
45
-
46
- export default () => (
47
- <CustomProductHome
48
- href="#"
49
- iconAlt="Atlassian"
50
- iconUrl={icon}
51
- logoAlt="Atlassian"
52
- logoUrl={logo}
53
- />
54
- );
55
- `}
56
-
57
- ${(
58
- <Example
59
- title="Custom product home"
60
- Component={require('../examples/custom-product-home').default}
61
- source={require('!!raw-loader!../examples/custom-product-home')}
62
- />
63
- )}
64
-
65
- ### Props
66
-
67
- ${(
68
- <Props
69
- heading=""
70
- props={require('!!extract-react-types-loader!../src/components/ProductHome/custom-product-home')}
71
- />
72
- )}
73
- `;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md, Props } from '@atlaskit/docs';
4
-
5
- export default md`
6
- App switcher is a pre-made button with an icon that you can use to then implement an app switcher,
7
- generally you'll want to use the [Atlassian switcher](/packages/navigation/atlassian-switcher) component composed with
8
-
9
- ${code`
10
- import { AppSwitcher } from '@atlaskit/atlassian-navigation';
11
-
12
- <AppSwitcher tooltip="Switch to..." />;
13
- `}
14
-
15
- ${(
16
- <Example
17
- title="App switcher"
18
- Component={require('../examples/app-switcher').default}
19
- source={require('!!raw-loader!../examples/app-switcher')}
20
- />
21
- )}
22
-
23
- ${(
24
- <Props
25
- heading="Props"
26
- props={require('!!extract-react-types-loader!../src/components/AppSwitcher')}
27
- />
28
- )}
29
- `;
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md, Props } from '@atlaskit/docs';
4
-
5
- export default md`
6
- Primary call to action component for the Atlassian navigation package which handles responsive viewports.
7
- Compose this with the [Atlassian navigation](atlassian-navigation) package.
8
-
9
- ${code`
10
- import { Create } from '@atlaskit/atlassian-navigation';
11
-
12
- <Create text="Create" onClick={console.log} />;
13
- `}
14
-
15
- ${(
16
- <Example
17
- title="Create"
18
- Component={require('../examples/create').default}
19
- source={require('!!raw-loader!../examples/create')}
20
- />
21
- )}
22
-
23
- ${(
24
- <Example
25
- title="Create as a link"
26
- Component={require('../examples/create-with-link').default}
27
- source={require('!!raw-loader!../examples/create-with-link')}
28
- />
29
- )}
30
-
31
- ${(
32
- <Props
33
- heading="Props"
34
- props={require('!!extract-react-types-loader!../src/components/Create')}
35
- />
36
- )}
37
- `;
@@ -1,64 +0,0 @@
1
- import React from 'react';
2
-
3
- import { code, Example, md, Props } from '@atlaskit/docs';
4
-
5
- export default md`
6
- These actions are to be used with the \`primaryItems\` prop in the \`primaryItems\` of the Atlassian navigation component.
7
-
8
- ## Primary button
9
-
10
- Buttons to be used when navigating through pages in your application,
11
- or displaying modals,
12
- drawers,
13
- etc.
14
-
15
- ${code`
16
- import { PrimaryButton } from '@atlaskit/atlassian-navigation';
17
-
18
- <PrimaryButton>Explore</PrimaryButton>;
19
- `}
20
-
21
- ${(
22
- <Example
23
- title="Primary button"
24
- Component={require('../examples/primary-button').default}
25
- source={require('!!raw-loader!../examples/primary-button')}
26
- />
27
- )}
28
-
29
- ### Props
30
-
31
- ${(
32
- <Props
33
- heading=""
34
- props={require('!!extract-react-types-loader!../src/components/PrimaryButton')}
35
- />
36
- )}
37
-
38
- ## Primary dropdown button
39
-
40
- Dropdown button to be used when composing with [Popup](/packages/design-system/popup) and [Menu](/packages/design-system/menu).
41
-
42
- ${code`
43
- import { PrimaryDropdownButton } from '@atlaskit/atlassian-navigation';
44
-
45
- <PrimaryDropdownButton>Explore</PrimaryDropdownButton>;
46
- `}
47
-
48
- ${(
49
- <Example
50
- title="Primary dropdown button"
51
- Component={require('../examples/primary-dropdown-button').default}
52
- source={require('!!raw-loader!../examples/primary-dropdown-button')}
53
- />
54
- )}
55
-
56
- ### Props
57
-
58
- ${(
59
- <Props
60
- heading=""
61
- props={require('!!extract-react-types-loader!../src/components/PrimaryDropdownButton')}
62
- />
63
- )}
64
- `;