@atlaskit/side-navigation 1.2.12 → 1.2.13
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.
- package/CHANGELOG.md +7 -0
- package/codemods/{0.8.0-change-css-fn-prop.ts → 0.8.0-change-css-fn-prop.tsx} +0 -0
- package/codemods/__tests__/{0.8.0-change-css-fn-prop.ts → 0.8.0-change-css-fn-prop.tsx} +0 -0
- package/codemods/helpers/{generic.ts → generic.tsx} +0 -0
- package/dist/cjs/components/Footer/index.js +11 -2
- package/dist/cjs/components/Header/index.js +11 -2
- package/dist/cjs/components/Item/button-item.js +10 -1
- package/dist/cjs/components/Item/go-back-item.js +11 -1
- package/dist/cjs/components/Item/link-item.js +12 -1
- package/dist/cjs/components/Item/skeleton-item.js +11 -2
- package/dist/cjs/components/LoadingItems/index.js +6 -0
- package/dist/cjs/components/NavigationContent/index.js +9 -0
- package/dist/cjs/components/NavigationFooter/index.js +8 -0
- package/dist/cjs/components/NavigationHeader/index.js +9 -0
- package/dist/cjs/components/NestableNavigationContent/context.js +3 -0
- package/dist/cjs/components/NestableNavigationContent/index.js +8 -0
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +3 -0
- package/dist/cjs/components/NestingItem/hack-for-ert.js +1 -0
- package/dist/cjs/components/Section/heading-item.js +7 -1
- package/dist/cjs/components/Section/section.js +11 -1
- package/dist/cjs/components/Section/skeleton-heading-item.js +10 -2
- package/dist/cjs/components/SideNavigation/index.js +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Footer/index.js +11 -2
- package/dist/es2019/components/Header/index.js +11 -2
- package/dist/es2019/components/Item/button-item.js +11 -1
- package/dist/es2019/components/Item/custom-item.js +2 -0
- package/dist/es2019/components/Item/go-back-item.js +12 -1
- package/dist/es2019/components/Item/link-item.js +13 -1
- package/dist/es2019/components/Item/skeleton-item.js +11 -2
- package/dist/es2019/components/LoadingItems/index.js +5 -0
- package/dist/es2019/components/NavigationContent/index.js +9 -0
- package/dist/es2019/components/NavigationFooter/index.js +8 -0
- package/dist/es2019/components/NavigationHeader/index.js +8 -0
- package/dist/es2019/components/NestableNavigationContent/context.js +4 -0
- package/dist/es2019/components/NestableNavigationContent/index.js +8 -0
- package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +4 -0
- package/dist/es2019/components/NestingItem/hack-for-ert.js +1 -0
- package/dist/es2019/components/Section/heading-item.js +7 -1
- package/dist/es2019/components/Section/section.js +11 -1
- package/dist/es2019/components/Section/skeleton-heading-item.js +10 -2
- package/dist/es2019/components/SideNavigation/index.js +10 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Footer/index.js +11 -2
- package/dist/esm/components/Header/index.js +11 -2
- package/dist/esm/components/Item/button-item.js +11 -1
- package/dist/esm/components/Item/custom-item.js +2 -0
- package/dist/esm/components/Item/go-back-item.js +12 -1
- package/dist/esm/components/Item/link-item.js +13 -1
- package/dist/esm/components/Item/skeleton-item.js +11 -2
- package/dist/esm/components/LoadingItems/index.js +5 -0
- package/dist/esm/components/NavigationContent/index.js +9 -0
- package/dist/esm/components/NavigationFooter/index.js +8 -0
- package/dist/esm/components/NavigationHeader/index.js +8 -0
- package/dist/esm/components/NestableNavigationContent/context.js +4 -0
- package/dist/esm/components/NestableNavigationContent/index.js +8 -0
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +4 -0
- package/dist/esm/components/NestingItem/hack-for-ert.js +1 -0
- package/dist/esm/components/Section/heading-item.js +7 -1
- package/dist/esm/components/Section/section.js +11 -1
- package/dist/esm/components/Section/skeleton-heading-item.js +10 -2
- package/dist/esm/components/SideNavigation/index.js +10 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Footer/index.d.ts +6 -0
- package/dist/types/components/Header/index.d.ts +9 -3
- package/dist/types/components/Item/button-item.d.ts +9 -0
- package/dist/types/components/Item/custom-item.d.ts +2 -2
- package/dist/types/components/Item/go-back-item.d.ts +9 -0
- package/dist/types/components/Item/link-item.d.ts +11 -0
- package/dist/types/components/Item/skeleton-item.d.ts +8 -0
- package/dist/types/components/LoadingItems/index.d.ts +6 -1
- package/dist/types/components/NavigationContent/index.d.ts +8 -0
- package/dist/types/components/NavigationFooter/index.d.ts +8 -0
- package/dist/types/components/NavigationHeader/index.d.ts +8 -0
- package/dist/types/components/NestableNavigationContent/context.d.ts +3 -0
- package/dist/types/components/NestableNavigationContent/index.d.ts +12 -4
- package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +3 -0
- package/dist/types/components/NestingItem/index.d.ts +1 -1
- package/dist/types/components/Section/heading-item.d.ts +6 -0
- package/dist/types/components/Section/section.d.ts +9 -0
- package/dist/types/components/Section/skeleton-heading-item.d.ts +7 -0
- package/dist/types/components/SideNavigation/index.d.ts +9 -0
- package/docs/00-intro.tsx +10 -65
- package/package.json +8 -7
- package/report.api.md +419 -0
- package/docs/01-side-navigation.tsx +0 -33
- package/docs/02-navigation-header.tsx +0 -39
- package/docs/03-navigation-content.tsx +0 -40
- package/docs/04-nestable-navigation-content.tsx +0 -95
- package/docs/05-navigation-footer.tsx +0 -38
- package/docs/99-loading-states.tsx +0 -95
- package/docs/button-item.tsx +0 -38
- package/docs/custom-item.tsx +0 -45
- package/docs/go-back-item.tsx +0 -31
- package/docs/heading-item.tsx +0 -30
- package/docs/link-item.tsx +0 -39
- package/docs/nesting-item.tsx +0 -52
- package/docs/section.tsx +0 -40
- package/docs/skeleton-heading-item.tsx +0 -30
- package/docs/skeleton-item.tsx +0 -30
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Occasionally you will need to asynchronously load some of your side nav.
|
|
7
|
-
There are a few things to take care of:
|
|
8
|
-
|
|
9
|
-
1. Only use skeletons when you're quite certain of what the loaded state will look like.
|
|
10
|
-
The majority of items that would appear in side navigation are probably fine to use with skeletons,
|
|
11
|
-
for example \`@atlaskit/tree\`
|
|
12
|
-
1. When transitioning from loading skeleton to loaded items try to ensure the jump does not look janky - use the equivalent skeleton item that is appropriate and be careful of things jumping around by a few pixels
|
|
13
|
-
We should be striving for UI that **feels solid**,
|
|
14
|
-
which means it doesn't jump around
|
|
15
|
-
1. Ensure loading does not take _too_ long - try to anticipate if a user will look at your menu via hover events and the like and pre-load the data as soon as you can
|
|
16
|
-
1. When content is loading in make sure it all loads in at once altogether - our minds aren't fast enough to distinguish each item loading individually for example,
|
|
17
|
-
and it would appear slower to the majority of users
|
|
18
|
-
|
|
19
|
-
For a more in-depth look at how to approach loading states have our _work in progress_ [Skeleton exploration](https://hello.atlassian.net/wiki/spaces/ADG/pages/598816601/Loading+experiences+-+3.4+-+Guideline+exploration+-+Skeleton#Exploration-(spec)) (only Atlassians will be able to access this link unfortuntely).
|
|
20
|
-
|
|
21
|
-
${code`highlight=1,9-17,21
|
|
22
|
-
import {
|
|
23
|
-
LoadingItems,
|
|
24
|
-
SectionHeading,
|
|
25
|
-
SkeletonItem
|
|
26
|
-
} from '@atlaskit/side-navigation';
|
|
27
|
-
|
|
28
|
-
<SideNavigation>
|
|
29
|
-
<NavigationContent>
|
|
30
|
-
<LoadingItems
|
|
31
|
-
isLoading={isLoading}
|
|
32
|
-
fallback={
|
|
33
|
-
<>
|
|
34
|
-
<SectionHeading>Project settings</SectionHeading>
|
|
35
|
-
<SkeletonItem />
|
|
36
|
-
</>
|
|
37
|
-
}
|
|
38
|
-
>
|
|
39
|
-
<Section title="Project settings">
|
|
40
|
-
<ButtonItem>Details</ButtonItem>
|
|
41
|
-
</Section>
|
|
42
|
-
</LoadingItems>
|
|
43
|
-
<NavigationContent>
|
|
44
|
-
<SideNavigation>
|
|
45
|
-
`}
|
|
46
|
-
|
|
47
|
-
${(
|
|
48
|
-
<Example
|
|
49
|
-
title=""
|
|
50
|
-
Component={require('../examples/07-loading-section.tsx').default}
|
|
51
|
-
source={require('!!raw-loader!../examples/07-loading-section.tsx')}
|
|
52
|
-
/>
|
|
53
|
-
)}
|
|
54
|
-
|
|
55
|
-
${(
|
|
56
|
-
<Props
|
|
57
|
-
heading="Props"
|
|
58
|
-
props={require('!!extract-react-types-loader!../src/components/LoadingItems')}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
|
|
62
|
-
## React Suspense
|
|
63
|
-
|
|
64
|
-
If you're using [Suspense](https://reactjs.org/docs/code-splitting.html#reactlazy) you'll want to use it instead of using the loading items component.
|
|
65
|
-
Unfortunately you won't be able to cross-fade between states,
|
|
66
|
-
but you will simplify your code quite a bit.
|
|
67
|
-
|
|
68
|
-
${code`highlight=1,6-15
|
|
69
|
-
import { Suspense } from 'react';
|
|
70
|
-
import { SectionHeading, SkeletonItem } from '@atlaskit/side-navigation';
|
|
71
|
-
|
|
72
|
-
<SideNavigation>
|
|
73
|
-
<NavigationContent>
|
|
74
|
-
<Suspense
|
|
75
|
-
fallback={
|
|
76
|
-
<>
|
|
77
|
-
<SectionHeading>Project settings</SectionHeading>
|
|
78
|
-
<SkeletonItem />
|
|
79
|
-
</>
|
|
80
|
-
}
|
|
81
|
-
>
|
|
82
|
-
<LazyItems />
|
|
83
|
-
</Suspense>
|
|
84
|
-
<NavigationContent>
|
|
85
|
-
<SideNavigation>
|
|
86
|
-
`}
|
|
87
|
-
|
|
88
|
-
${(
|
|
89
|
-
<Example
|
|
90
|
-
title=""
|
|
91
|
-
Component={require('../examples/08-suspense-loading-section.tsx').default}
|
|
92
|
-
source={require('!!raw-loader!../examples/08-suspense-loading-section.tsx')}
|
|
93
|
-
/>
|
|
94
|
-
)}
|
|
95
|
-
`;
|
package/docs/button-item.tsx
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
import SectionMessage from '@atlaskit/section-message';
|
|
5
|
-
|
|
6
|
-
export default md`
|
|
7
|
-
${(
|
|
8
|
-
<SectionMessage title="Important usage instructions">
|
|
9
|
-
The <a href="section">section component</a> is required to be used to
|
|
10
|
-
ensure spacing around blocks of items exists! Make sure to use it.
|
|
11
|
-
</SectionMessage>
|
|
12
|
-
)}
|
|
13
|
-
|
|
14
|
-
Will render an item wrapped in a button tag \`<button>\` -
|
|
15
|
-
useful when you have an action that does something _other than_ changing routes.
|
|
16
|
-
|
|
17
|
-
${code`
|
|
18
|
-
import { ButtonItem } from '@atlaskit/side-navigation';
|
|
19
|
-
|
|
20
|
-
<ButtonItem>Create article</ButtonItem>
|
|
21
|
-
`}
|
|
22
|
-
|
|
23
|
-
${(
|
|
24
|
-
<Example
|
|
25
|
-
title=""
|
|
26
|
-
Component={require('../examples/button-item.tsx').default}
|
|
27
|
-
source={require('!!raw-loader!../examples/button-item.tsx')}
|
|
28
|
-
/>
|
|
29
|
-
)}
|
|
30
|
-
|
|
31
|
-
${(
|
|
32
|
-
<Props
|
|
33
|
-
heading="Props"
|
|
34
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
35
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/button-item')}
|
|
36
|
-
/>
|
|
37
|
-
)}
|
|
38
|
-
`;
|
package/docs/custom-item.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
import SectionMessage from '@atlaskit/section-message';
|
|
5
|
-
|
|
6
|
-
export default md`
|
|
7
|
-
${(
|
|
8
|
-
<SectionMessage title="Important usage instructions">
|
|
9
|
-
The <a href="section">section component</a> is required to be used to
|
|
10
|
-
ensure spacing around blocks of items exists! Make sure to use it.
|
|
11
|
-
</SectionMessage>
|
|
12
|
-
)}
|
|
13
|
-
|
|
14
|
-
Useful when wanting to create a item using a your own component that inherits the look and feel of a menu item.
|
|
15
|
-
Use cases could include using your own router link component for example.
|
|
16
|
-
|
|
17
|
-
Your custom component will be given all overflow props passed to the custom item component,
|
|
18
|
-
as well as when using TypeScript will add the custom component props to the root component props type for type safety.
|
|
19
|
-
|
|
20
|
-
${code`
|
|
21
|
-
import { CustomItem, CustomItemComponentProps } from '@atlaskit/side-navigation';
|
|
22
|
-
|
|
23
|
-
const Container = (props: CustomItemComponentProps) => {
|
|
24
|
-
return <span {...props}>{children}</span>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
<CustomItem component={Container}>Create article</CustomItem>
|
|
28
|
-
`}
|
|
29
|
-
|
|
30
|
-
${(
|
|
31
|
-
<Example
|
|
32
|
-
title=""
|
|
33
|
-
Component={require('../examples/custom-item.tsx').default}
|
|
34
|
-
source={require('!!raw-loader!../examples/custom-item.tsx')}
|
|
35
|
-
/>
|
|
36
|
-
)}
|
|
37
|
-
|
|
38
|
-
${(
|
|
39
|
-
<Props
|
|
40
|
-
heading="Props"
|
|
41
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
42
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/extract-react-types/custom-item-hack-for-ert')}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
`;
|
package/docs/go-back-item.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Used when wanting to customize the go back button in [nestable navigation content](/packages/navigation/side-navigation/docs/nestable-navigation-content) and [nesting item](/packages/navigation/side-navigation/docs/nesting-item).
|
|
7
|
-
The most common case for this is needing to translate the text,
|
|
8
|
-
but another would be if you want an SPA transition to happen when a user interacts with the element.
|
|
9
|
-
|
|
10
|
-
${code`
|
|
11
|
-
import { GoBackItem } from '@atlaskit/side-navigation';
|
|
12
|
-
|
|
13
|
-
<GoBackItem>Back to project</GoBackItem>
|
|
14
|
-
`}
|
|
15
|
-
|
|
16
|
-
${(
|
|
17
|
-
<Example
|
|
18
|
-
title=""
|
|
19
|
-
Component={require('../examples/go-back-item.tsx').default}
|
|
20
|
-
source={require('!!raw-loader!../examples/go-back-item.tsx')}
|
|
21
|
-
/>
|
|
22
|
-
)}
|
|
23
|
-
|
|
24
|
-
${(
|
|
25
|
-
<Props
|
|
26
|
-
heading="Props"
|
|
27
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
28
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/button-item')}
|
|
29
|
-
/>
|
|
30
|
-
)}
|
|
31
|
-
`;
|
package/docs/heading-item.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Heading that should be displayed inside a [section](/packages/navigation/side-navigation/docs/section).
|
|
7
|
-
When using the \`title\` prop you won't need to use this directly.
|
|
8
|
-
|
|
9
|
-
${code`
|
|
10
|
-
import { HeadingItem } from '@atlaskit/side-navigation';
|
|
11
|
-
|
|
12
|
-
<HeadingItem>Actions</HeadingItem>
|
|
13
|
-
`}
|
|
14
|
-
|
|
15
|
-
${(
|
|
16
|
-
<Example
|
|
17
|
-
title=""
|
|
18
|
-
Component={require('../examples/heading-item.tsx').default}
|
|
19
|
-
source={require('!!raw-loader!../examples/heading-item.tsx')}
|
|
20
|
-
/>
|
|
21
|
-
)}
|
|
22
|
-
|
|
23
|
-
${(
|
|
24
|
-
<Props
|
|
25
|
-
heading="Props"
|
|
26
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
27
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/heading-item')}
|
|
28
|
-
/>
|
|
29
|
-
)}
|
|
30
|
-
`;
|
package/docs/link-item.tsx
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
import SectionMessage from '@atlaskit/section-message';
|
|
5
|
-
|
|
6
|
-
export default md`
|
|
7
|
-
${(
|
|
8
|
-
<SectionMessage title="Important usage instructions">
|
|
9
|
-
The <a href="section">section component</a> is required to be used to
|
|
10
|
-
ensure spacing around blocks of items exists! Make sure to use it.
|
|
11
|
-
</SectionMessage>
|
|
12
|
-
)}
|
|
13
|
-
|
|
14
|
-
Will render an item wrapped in an anchor tag \`<a>\` -
|
|
15
|
-
useful when you have an item that should change routes.
|
|
16
|
-
If wanting to do SPA transitions make sure to use a [custom item](/packages/navigation/side-navigation/docs/custom-item) with your router link instead.
|
|
17
|
-
|
|
18
|
-
${code`
|
|
19
|
-
import { LinkItem } from '@atlaskit/side-navigation';
|
|
20
|
-
|
|
21
|
-
<LinkItem href="#">My articles</LinkItem>
|
|
22
|
-
`}
|
|
23
|
-
|
|
24
|
-
${(
|
|
25
|
-
<Example
|
|
26
|
-
title=""
|
|
27
|
-
Component={require('../examples/link-item.tsx').default}
|
|
28
|
-
source={require('!!raw-loader!../examples/link-item.tsx')}
|
|
29
|
-
/>
|
|
30
|
-
)}
|
|
31
|
-
|
|
32
|
-
${(
|
|
33
|
-
<Props
|
|
34
|
-
heading="Props"
|
|
35
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
36
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/link-item')}
|
|
37
|
-
/>
|
|
38
|
-
)}
|
|
39
|
-
`;
|
package/docs/nesting-item.tsx
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Used to create a nested view inside a [nestable navigation content](/packages/navigation/side-navigation/docs/nestable-navigation-content) component.
|
|
7
|
-
Will only work inside one - if you render it outside you'll get an error.
|
|
8
|
-
You can infinitely nest nesting items,
|
|
9
|
-
but the rule of thumb is try and limit nesting to three layers.
|
|
10
|
-
|
|
11
|
-
Will render its children when the view is active,
|
|
12
|
-
else will render itself as a button item waiting to be interacted with.
|
|
13
|
-
Once interacted,
|
|
14
|
-
the nested view will be shown.
|
|
15
|
-
|
|
16
|
-
${code`highlight=7,11
|
|
17
|
-
import {
|
|
18
|
-
NestableNavigationContent,
|
|
19
|
-
NestingItem
|
|
20
|
-
} from '@atlaskit/side-navigation';
|
|
21
|
-
|
|
22
|
-
<NavigationHeader label="project">
|
|
23
|
-
<NavigationHeader>
|
|
24
|
-
<Header>Money machine</Header>
|
|
25
|
-
</NavigationHeader>
|
|
26
|
-
<NestableNavigationContent>
|
|
27
|
-
<Section>
|
|
28
|
-
<NestingItem title="Print money">
|
|
29
|
-
<Section>
|
|
30
|
-
<ButtonItem>Money printed</ButtonItem>
|
|
31
|
-
</Section>
|
|
32
|
-
</NestingItem>
|
|
33
|
-
</Section>
|
|
34
|
-
</NestableNavigationContent>
|
|
35
|
-
</NavigationHeader>
|
|
36
|
-
`}
|
|
37
|
-
|
|
38
|
-
${(
|
|
39
|
-
<Example
|
|
40
|
-
title=""
|
|
41
|
-
Component={require('../examples/nesting-item').default}
|
|
42
|
-
source={require('!!raw-loader!../examples/nesting-item')}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
|
|
46
|
-
${(
|
|
47
|
-
<Props
|
|
48
|
-
heading="Props"
|
|
49
|
-
props={require('!!extract-react-types-loader!../src/components/NestingItem/hack-for-ert')}
|
|
50
|
-
/>
|
|
51
|
-
)}
|
|
52
|
-
`;
|
package/docs/section.tsx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
import SectionMessage from '@atlaskit/section-message';
|
|
5
|
-
|
|
6
|
-
export default md`
|
|
7
|
-
${(
|
|
8
|
-
<SectionMessage title="Important usage instructions">
|
|
9
|
-
Section is required to be used to ensure spacing around blocks of items
|
|
10
|
-
exists! Make sure to use it.
|
|
11
|
-
</SectionMessage>
|
|
12
|
-
)}
|
|
13
|
-
|
|
14
|
-
Used to separate items into sections.
|
|
15
|
-
When using the \`title\` prop your section will implicitly group the items for screen readers without you needing to do anything.
|
|
16
|
-
|
|
17
|
-
${code`
|
|
18
|
-
import { Section } from '@atlaskit/side-navigation';
|
|
19
|
-
|
|
20
|
-
<Section title="Actions">
|
|
21
|
-
<ButtonItem>Create issue</ButtonItem>
|
|
22
|
-
</Section>
|
|
23
|
-
`}
|
|
24
|
-
|
|
25
|
-
${(
|
|
26
|
-
<Example
|
|
27
|
-
title=""
|
|
28
|
-
Component={require('../examples/section.tsx').default}
|
|
29
|
-
source={require('!!raw-loader!../examples/section.tsx')}
|
|
30
|
-
/>
|
|
31
|
-
)}
|
|
32
|
-
|
|
33
|
-
${(
|
|
34
|
-
<Props
|
|
35
|
-
heading="Props"
|
|
36
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
37
|
-
props={require('!!extract-react-types-loader!../src/components/Section/section')}
|
|
38
|
-
/>
|
|
39
|
-
)}
|
|
40
|
-
`;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Renders a skeleton which should be used in place of any heading item that is currently loading.
|
|
7
|
-
See [loading states](/packages/navigation/side-navigation/docs/loading-states) for best practices.
|
|
8
|
-
|
|
9
|
-
${code`
|
|
10
|
-
import { SkeletonHeadingItem } from '@atlaskit/side-navigation';
|
|
11
|
-
|
|
12
|
-
<SkeletonHeadingItem />
|
|
13
|
-
`}
|
|
14
|
-
|
|
15
|
-
${(
|
|
16
|
-
<Example
|
|
17
|
-
title=""
|
|
18
|
-
Component={require('../examples/skeleton-heading-item.tsx').default}
|
|
19
|
-
source={require('!!raw-loader!../examples/skeleton-heading-item.tsx')}
|
|
20
|
-
/>
|
|
21
|
-
)}
|
|
22
|
-
|
|
23
|
-
${(
|
|
24
|
-
<Props
|
|
25
|
-
heading="Props"
|
|
26
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
27
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/skeleton-heading-item')}
|
|
28
|
-
/>
|
|
29
|
-
)}
|
|
30
|
-
`;
|
package/docs/skeleton-item.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Renders a skeleton which should be used in place any any item that is currently loading.
|
|
7
|
-
See [loading states](/packages/navigation/side-navigation/docs/loading-states) for best practices.
|
|
8
|
-
|
|
9
|
-
${code`
|
|
10
|
-
import { SkeletonItem } from '@atlaskit/side-navigation';
|
|
11
|
-
|
|
12
|
-
<SkeletonItem />
|
|
13
|
-
`}
|
|
14
|
-
|
|
15
|
-
${(
|
|
16
|
-
<Example
|
|
17
|
-
title=""
|
|
18
|
-
Component={require('../examples/skeleton-item.tsx').default}
|
|
19
|
-
source={require('!!raw-loader!../examples/skeleton-item.tsx')}
|
|
20
|
-
/>
|
|
21
|
-
)}
|
|
22
|
-
|
|
23
|
-
${(
|
|
24
|
-
<Props
|
|
25
|
-
heading="Props"
|
|
26
|
-
// We point to the original props object because for some reason ERT can't follow package boundaries.
|
|
27
|
-
props={require('!!extract-react-types-loader!../../../design-system/menu/src/menu-item/skeleton-item')}
|
|
28
|
-
/>
|
|
29
|
-
)}
|
|
30
|
-
`;
|