@redocly/theme 0.1.8 → 0.1.11
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/Button/index.d.ts +1 -1
- package/Button/index.js +1 -1
- package/CodeBlock/index.d.ts +1 -1
- package/CodeBlock/index.js +1 -1
- package/CopyButton/index.d.ts +2 -2
- package/CopyButton/index.js +2 -2
- package/Footer/Footer.d.ts +2 -2
- package/Footer/Footer.js +6 -5
- package/Footer/FooterColumn.d.ts +1 -1
- package/Footer/FooterColumn.js +8 -7
- package/Footer/FooterColumns.d.ts +3 -3
- package/Footer/FooterColumns.js +4 -4
- package/Footer/FooterCopyright.d.ts +3 -3
- package/Footer/FooterCopyright.js +3 -2
- package/Footer/index.d.ts +4 -4
- package/Footer/index.js +17 -11
- package/Headings/index.d.ts +1 -1
- package/Headings/index.js +1 -1
- package/JsonViewer/index.d.ts +2 -2
- package/JsonViewer/index.js +2 -2
- package/Layout/PageLayout.d.ts +1 -1
- package/Layout/PageLayout.js +2 -1
- package/Layout/RootLayout.d.ts +1 -1
- package/Layout/RootLayout.js +2 -1
- package/Layout/index.d.ts +2 -2
- package/Layout/index.js +15 -7
- package/Markdown/{Admonition/Admonition.d.ts → Admonition.d.ts} +0 -0
- package/Markdown/{Admonition/Admonition.js → Admonition.js} +5 -5
- package/Markdown/CodeSample/index.d.ts +3 -0
- package/Markdown/CodeSample/index.js +19 -0
- package/Markdown/{Heading/Heading.d.ts → Heading.d.ts} +0 -0
- package/Markdown/{Heading/Heading.js → Heading.js} +1 -1
- package/Markdown/MarkdownLayout.d.ts +2 -2
- package/Markdown/{Mermaid/Mermaid.d.ts → Mermaid.d.ts} +0 -0
- package/Markdown/{Mermaid/Mermaid.js → Mermaid.js} +0 -0
- package/Markdown/StyledMarkdown.js +2 -2
- package/Markdown/Tabs/index.d.ts +2 -0
- package/Markdown/Tabs/index.js +18 -0
- package/Markdown/index.d.ts +9 -0
- package/Markdown/index.js +25 -0
- package/Navbar/Navbar.d.ts +1 -2
- package/Navbar/Navbar.js +3 -3
- package/Navbar/NavbarItem.d.ts +1 -1
- package/Navbar/NavbarItem.js +3 -3
- package/Navbar/NavbarMenu.d.ts +1 -1
- package/Navbar/NavbarMenu.js +5 -4
- package/Navbar/index.d.ts +3 -0
- package/Navbar/index.js +19 -0
- package/NavbarLogo/NavbarLogo.d.ts +6 -0
- package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
- package/NavbarLogo/index.d.ts +1 -0
- package/NavbarLogo/index.js +17 -0
- package/OperationBadge/index.d.ts +1 -1
- package/OperationBadge/index.js +1 -1
- package/PageNavigation/index.d.ts +3 -0
- package/PageNavigation/index.js +19 -0
- package/Panel/index.d.ts +8 -8
- package/Panel/index.js +8 -8
- package/REAMDE.md +1 -0
- package/SamplesPanelControls/index.d.ts +1 -1
- package/SamplesPanelControls/index.js +1 -1
- package/Search/Autocomplete.js +1 -1
- package/Search/ClearIcon.js +1 -1
- package/Search/Parameters.js +2 -2
- package/Search/SearchIcon.js +1 -1
- package/Search/SearchItem.js +2 -2
- package/Search/index.d.ts +9 -0
- package/Search/index.js +25 -0
- package/Search/utils.js +1 -1
- package/Sidebar/ApiCallItem.d.ts +2 -2
- package/Sidebar/ApiCallItem.js +6 -6
- package/Sidebar/ArrowBack.d.ts +1 -2
- package/Sidebar/ArrowBack.js +2 -1
- package/Sidebar/BackButton.d.ts +1 -1
- package/Sidebar/BackButton.js +5 -4
- package/Sidebar/Drilldown.d.ts +2 -2
- package/Sidebar/Drilldown.js +8 -7
- package/Sidebar/DrilldownMenu.d.ts +2 -2
- package/Sidebar/DrilldownMenu.js +5 -7
- package/Sidebar/DrilldownMenuItem.d.ts +2 -2
- package/Sidebar/DrilldownMenuItem.js +5 -4
- package/Sidebar/ExternalIcon.d.ts +1 -2
- package/Sidebar/ExternalIcon.js +2 -1
- package/Sidebar/Menu.d.ts +1 -2
- package/Sidebar/Menu.js +3 -2
- package/Sidebar/MenuContainer.d.ts +1 -2
- package/Sidebar/MenuContainer.js +2 -1
- package/Sidebar/MenuGroup.d.ts +1 -1
- package/Sidebar/MenuGroup.js +6 -6
- package/Sidebar/MenuItem.d.ts +2 -2
- package/Sidebar/MenuItem.js +7 -6
- package/Sidebar/MenuItemLabel.d.ts +1 -2
- package/Sidebar/MenuItemLabel.js +4 -3
- package/Sidebar/MenuLink.d.ts +1 -2
- package/Sidebar/MenuLink.js +3 -2
- package/Sidebar/MenuLinkItem.d.ts +2 -2
- package/Sidebar/MenuLinkItem.js +4 -3
- package/Sidebar/MobileSidebarButton.d.ts +1 -2
- package/Sidebar/MobileSidebarButton.js +3 -2
- package/Sidebar/Separator.d.ts +2 -2
- package/Sidebar/Separator.js +5 -4
- package/Sidebar/SeparatorItem.d.ts +1 -2
- package/Sidebar/SeparatorItem.js +3 -2
- package/Sidebar/SeparatorLine.d.ts +1 -2
- package/Sidebar/SeparatorLine.js +2 -1
- package/Sidebar/Sidebar.d.ts +2 -2
- package/Sidebar/Sidebar.js +3 -2
- package/Sidebar/SidebarLayout.d.ts +1 -1
- package/Sidebar/SidebarLayout.js +6 -5
- package/Sidebar/index.d.ts +19 -0
- package/Sidebar/index.js +35 -0
- package/Sidebar/types/DrilldownMenuProps.d.ts +2 -2
- package/Sidebar/types/ItemState.d.ts +2 -3
- package/Sidebar/types/MenuItemProps.d.ts +2 -2
- package/Sidebar/types/NavItem.d.ts +1 -1
- package/Sidebar/types/index.d.ts +5 -0
- package/Sidebar/types/index.js +21 -0
- package/SidebarLogo/index.d.ts +1 -1
- package/SidebarLogo/index.js +1 -1
- package/SourceCode/index.d.ts +1 -1
- package/SourceCode/index.js +1 -1
- package/TableOfContent/TableOfContent.d.ts +1 -1
- package/TableOfContent/TableOfContent.js +9 -9
- package/TableOfContent/index.d.ts +1 -0
- package/TableOfContent/index.js +17 -0
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.d.ts +1 -0
- package/globalStyle.js +7 -3
- package/hooks/index.d.ts +7 -7
- package/hooks/index.js +7 -7
- package/hooks/useActiveSectionId.d.ts +2 -2
- package/hooks/useActiveSectionId.js +1 -0
- package/icons/ShelfIcon/index.d.ts +2 -2
- package/icons/ShelfIcon/index.js +1 -1
- package/icons/index.d.ts +1 -1
- package/icons/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/mocks/Link.js +4 -1
- package/mocks/hooks/usePageData.js +4 -1
- package/package.json +1 -1
- package/src/Button/Button.stories.tsx +1 -1
- package/src/Button/index.ts +1 -1
- package/src/CodeBlock/index.ts +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +1 -1
- package/src/CopyButton/index.ts +2 -2
- package/src/DesignTokens/borders.stories.mdx +20 -0
- package/src/DesignTokens/colors.stories.mdx +24 -0
- package/src/DesignTokens/page-layout.stories.mdx +12 -0
- package/src/DesignTokens/tokens-generated.scss +610 -0
- package/src/DesignTokens/typography.stories.mdx +36 -0
- package/src/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +7 -10
- package/src/Footer/FooterColumn.tsx +8 -8
- package/src/Footer/FooterColumns.tsx +5 -3
- package/src/Footer/FooterCopyright.tsx +6 -4
- package/src/Footer/__tests__/Footer.test.tsx +55 -0
- package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +253 -0
- package/src/Footer/index.ts +4 -0
- package/src/Headings/index.ts +1 -1
- package/src/JsonViewer/JsonViewer.stories.tsx +1 -1
- package/src/JsonViewer/index.ts +2 -2
- package/src/Layout/PageLayout.tsx +1 -1
- package/src/Layout/RootLayout.tsx +1 -1
- package/src/Layout/__tests__/PageLayout.test.tsx +17 -0
- package/src/Layout/__tests__/RootLayout.test.tsx +17 -0
- package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +38 -0
- package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +18 -0
- package/src/Layout/index.ts +2 -0
- package/src/Markdown/{Admonition/Admonition.tsx → Admonition.tsx} +15 -15
- package/src/Markdown/CodeSample/index.ts +3 -0
- package/src/Markdown/{Heading/Heading.tsx → Heading.tsx} +4 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -2
- package/src/Markdown/{Mermaid/Mermaid.tsx → Mermaid.tsx} +0 -0
- package/src/Markdown/StyledMarkdown.tsx +27 -27
- package/src/Markdown/Tabs/index.ts +2 -0
- package/src/Markdown/index.ts +9 -0
- package/src/Navbar/Navbar.stories.tsx +10 -6
- package/src/Navbar/Navbar.tsx +3 -4
- package/src/Navbar/NavbarItem.tsx +2 -2
- package/src/Navbar/NavbarMenu.tsx +3 -3
- package/src/Navbar/__tests__/Navbar.test.tsx +55 -0
- package/src/Navbar/__tests__/__snapshots__/Navbar.test.tsx.snap +256 -0
- package/src/Navbar/index.ts +3 -0
- package/src/NavbarLogo/NavbarLogo.stories.tsx +20 -0
- package/src/NavbarLogo/NavbarLogo.tsx +24 -0
- package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +47 -0
- package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +38 -0
- package/src/NavbarLogo/index.ts +1 -0
- package/src/OperationBadge/OperationBadge.stories.tsx +1 -1
- package/src/OperationBadge/index.ts +1 -1
- package/src/PageNavigation/PageNavigation.stories.tsx +21 -0
- package/src/PageNavigation/__tests__/NextPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/PageNavigation.test.tsx +54 -0
- package/src/PageNavigation/__tests__/PreviousPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/__snapshots__/NextPageLink.test.tsx.snap +67 -0
- package/src/PageNavigation/__tests__/__snapshots__/PageNavigation.test.tsx.snap +275 -0
- package/src/PageNavigation/__tests__/__snapshots__/PreviousPageLink.test.tsx.snap +67 -0
- package/src/PageNavigation/index.ts +3 -0
- package/src/Panel/index.ts +8 -8
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +1 -1
- package/src/SamplesPanelControls/index.ts +1 -1
- package/src/Search/Autocomplete.tsx +1 -1
- package/src/Search/ClearIcon.tsx +11 -12
- package/src/Search/Parameters.tsx +2 -2
- package/src/Search/SearchIcon.tsx +11 -12
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/__tests__/Input.test.tsx +13 -0
- package/src/Search/__tests__/__snapshots__/Input.test.tsx.snap +36 -0
- package/src/Search/index.ts +9 -0
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/ApiCallItem.tsx +5 -5
- package/src/Sidebar/ArrowBack.tsx +1 -1
- package/src/Sidebar/BackButton.tsx +4 -4
- package/src/Sidebar/Drilldown.tsx +6 -6
- package/src/Sidebar/DrilldownMenu.tsx +4 -4
- package/src/Sidebar/DrilldownMenuItem.tsx +6 -6
- package/src/Sidebar/ExternalIcon.tsx +1 -1
- package/src/Sidebar/Menu.tsx +2 -2
- package/src/Sidebar/MenuContainer.tsx +1 -1
- package/src/Sidebar/MenuGroup.tsx +5 -5
- package/src/Sidebar/MenuItem.tsx +6 -6
- package/src/Sidebar/MenuItemLabel.tsx +5 -5
- package/src/Sidebar/MenuLink.tsx +2 -2
- package/src/Sidebar/MenuLinkItem.tsx +3 -3
- package/src/Sidebar/MobileSidebarButton.tsx +3 -3
- package/src/Sidebar/Separator.tsx +4 -4
- package/src/Sidebar/SeparatorItem.tsx +2 -2
- package/src/Sidebar/SeparatorLine.tsx +1 -1
- package/src/Sidebar/Sidebar.tsx +2 -2
- package/src/Sidebar/SidebarLayout.tsx +4 -4
- package/src/Sidebar/index.ts +19 -0
- package/src/Sidebar/types/DrilldownMenuProps.ts +2 -2
- package/src/Sidebar/types/ItemState.ts +2 -4
- package/src/Sidebar/types/MenuItemProps.ts +2 -2
- package/src/Sidebar/types/NavItem.ts +1 -1
- package/src/Sidebar/types/index.ts +5 -0
- package/src/SidebarLogo/SidebarLogo.stories.tsx +1 -1
- package/src/SidebarLogo/index.ts +1 -1
- package/src/SourceCode/SourceCode.stories.tsx +1 -1
- package/src/SourceCode/index.ts +1 -1
- package/src/TableOfContent/TableOfContent.stories.tsx +37 -0
- package/src/TableOfContent/TableOfContent.tsx +13 -11
- package/src/TableOfContent/__tests__/TableOfContent.test.tsx +61 -0
- package/src/TableOfContent/__tests__/__snapshots__/TableOfContent.test.tsx.snap +153 -0
- package/src/TableOfContent/index.ts +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/index.ts +1 -1
- package/src/Welcome.stories.mdx +7 -0
- package/src/globalStyle.ts +333 -144
- package/src/hooks/index.ts +7 -7
- package/src/hooks/useActiveSectionId.ts +3 -3
- package/src/icons/ShelfIcon/index.ts +2 -2
- package/src/icons/index.ts +1 -1
- package/src/index.ts +1 -0
- package/src/mocks/Link.tsx +5 -2
- package/src/mocks/hooks/usePageData.ts +4 -1
- package/src/types/portal/index.d.ts +0 -1
- package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
- package/src/types/portal/src/client/app/media-css.d.ts +4 -4
- package/src/types/portal/src/client/styling/default.d.ts +585 -391
- package/src/types/portal/src/client/styling/index.d.ts +2 -6
- package/src/types/portal/src/server/constants.d.ts +5 -9
- package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
- package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
- package/src/types/portal/src/server/plugins/types.d.ts +55 -0
- package/src/types/portal/src/server/store.d.ts +49 -97
- package/src/types/portal/src/server/utils/async.d.ts +1 -5
- package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
- package/src/types/portal/src/server/utils/index.d.ts +1 -1
- package/src/types/portal/src/server/utils/paths.d.ts +10 -13
- package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
- package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
- package/src/types/portal/src/server/version-store.d.ts +35 -0
- package/src/types/portal/src/shared/constants.d.ts +6 -6
- package/src/types/portal/src/shared/types.d.ts +97 -58
- package/src/types/portal/src/shared/urls.d.ts +2 -1
- package/src/ui/AlertIcon.tsx +8 -7
- package/src/ui/{Arrow/Arrow.tsx → Arrow.tsx} +0 -0
- package/src/ui/Background.tsx +3 -3
- package/src/ui/Dropdown.tsx +5 -5
- package/src/ui/Jumbotron.tsx +3 -3
- package/src/ui/Tiles/TileHeader.ts +1 -1
- package/src/ui/Tiles/TileText.tsx +2 -2
- package/src/ui/Tiles/index.ts +4 -0
- package/src/ui/Typography.tsx +22 -22
- package/src/ui/UniversalLink.tsx +2 -2
- package/src/ui/index.tsx +8 -3
- package/src/utils/isUrl.ts +1 -1
- package/src/utils/replaceHashInColor.ts +1 -1
- package/ui/AlertIcon.d.ts +3 -2
- package/ui/AlertIcon.js +2 -2
- package/ui/{Arrow/Arrow.d.ts → Arrow.d.ts} +0 -0
- package/ui/{Arrow/Arrow.js → Arrow.js} +0 -0
- package/ui/Background.js +1 -1
- package/ui/Dropdown.d.ts +1 -1
- package/ui/Dropdown.js +5 -4
- package/ui/Jumbotron.js +3 -3
- package/ui/Tiles/TileHeader.js +1 -1
- package/ui/Tiles/TileText.js +1 -1
- package/ui/Tiles/index.d.ts +4 -0
- package/ui/Tiles/index.js +20 -0
- package/ui/Typography.js +20 -20
- package/ui/UniversalLink.js +4 -4
- package/ui/index.d.ts +7 -3
- package/ui/index.js +7 -3
- package/utils/isUrl.d.ts +1 -1
- package/utils/isUrl.js +2 -1
- package/utils/replaceHashInColor.d.ts +1 -1
- package/utils/replaceHashInColor.js +2 -1
- package/Logo/Logo.d.ts +0 -5
- package/src/Footer/index.tsx +0 -4
- package/src/Introduction.stories.mdx +0 -7
- package/src/Layout/index.tsx +0 -2
- package/src/Logo/Logo.tsx +0 -17
- package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
- package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
- package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
- package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
- package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
- package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`NavbarLogo renders 1`] = `
|
|
4
|
+
.c0 {
|
|
5
|
+
max-width: var(--logo-max-width);
|
|
6
|
+
max-height: var(--logo-max-height);
|
|
7
|
+
height: var(--logo-height);
|
|
8
|
+
margin: var(--logo-margin);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
<a
|
|
12
|
+
href="https://test.com/"
|
|
13
|
+
to="https://test.com/"
|
|
14
|
+
>
|
|
15
|
+
<img
|
|
16
|
+
alt="Navbar Logo"
|
|
17
|
+
class="c0"
|
|
18
|
+
data-component-name="NavbarLogo/NavbarLogo"
|
|
19
|
+
src="https://test.com/logo.png"
|
|
20
|
+
/>
|
|
21
|
+
</a>
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports[`NavbarLogo renders without link 1`] = `
|
|
25
|
+
.c0 {
|
|
26
|
+
max-width: var(--logo-max-width);
|
|
27
|
+
max-height: var(--logo-max-height);
|
|
28
|
+
height: var(--logo-height);
|
|
29
|
+
margin: var(--logo-margin);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
<img
|
|
33
|
+
alt="Navbar Logo"
|
|
34
|
+
class="c0"
|
|
35
|
+
data-component-name="NavbarLogo/NavbarLogo"
|
|
36
|
+
src="https://test.com/logo.png"
|
|
37
|
+
/>
|
|
38
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/NavbarLogo/NavbarLogo';
|
|
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
|
4
4
|
import { OperationBadge } from '@theme/OperationBadge';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'OperationBadge',
|
|
7
|
+
title: 'Components/OperationBadge',
|
|
8
8
|
component: OperationBadge,
|
|
9
9
|
argTypes: {},
|
|
10
10
|
} as ComponentMeta<typeof OperationBadge>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/OperationBadge/OperationBadge';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { PageNavigation } from '@theme/PageNavigation/PageNavigation';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Portal/PageNavigation',
|
|
8
|
+
component: PageNavigation,
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: { hideNoControlsWarning: true },
|
|
11
|
+
},
|
|
12
|
+
} as ComponentMeta<typeof PageNavigation>;
|
|
13
|
+
|
|
14
|
+
const Template: ComponentStory<typeof PageNavigation> = () => (
|
|
15
|
+
<div style={{ maxWidth: '400px' }}>
|
|
16
|
+
<PageNavigation />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
Default.args = {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { renderWithTheme } from '../../../tests/utils';
|
|
4
|
+
|
|
5
|
+
import { NextPageLink } from '@theme/PageNavigation/NextPageLink';
|
|
6
|
+
import { usePageData } from '@portal/hooks/usePageData';
|
|
7
|
+
|
|
8
|
+
jest.mock('@portal/hooks/usePageData');
|
|
9
|
+
|
|
10
|
+
describe('NextPageLink', () => {
|
|
11
|
+
it('renders when nextPage is null', () => {
|
|
12
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({ prevPage: null, nextPage: null });
|
|
13
|
+
|
|
14
|
+
const { container } = renderWithTheme(<NextPageLink />);
|
|
15
|
+
|
|
16
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('renders when nextPage exists', () => {
|
|
20
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
21
|
+
prevPage: null,
|
|
22
|
+
nextPage: { type: 'link', label: 'The Next Page', link: 'https://test.com' },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const { container } = renderWithTheme(<NextPageLink />);
|
|
26
|
+
|
|
27
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { renderWithTheme } from '../../../tests/utils';
|
|
4
|
+
|
|
5
|
+
import { PageNavigation } from '@theme/PageNavigation/PageNavigation';
|
|
6
|
+
import { usePageData } from '@portal/hooks/usePageData';
|
|
7
|
+
|
|
8
|
+
jest.mock('@portal/hooks/usePageData');
|
|
9
|
+
|
|
10
|
+
describe('PageNavigation', () => {
|
|
11
|
+
it('renders', () => {
|
|
12
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
13
|
+
prevPage: { type: 'link', label: 'The Previous Page', link: 'https://previous-page' },
|
|
14
|
+
nextPage: { type: 'link', label: 'The Next Page', link: 'https://next-page' },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const { container } = renderWithTheme(<PageNavigation />);
|
|
18
|
+
|
|
19
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('renders with previous page only', () => {
|
|
23
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
24
|
+
prevPage: { type: 'link', label: 'The Previous Page', link: 'https://previous-page' },
|
|
25
|
+
nextPage: null,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const { container } = renderWithTheme(<PageNavigation />);
|
|
29
|
+
|
|
30
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('renders with missing next and previous pages', () => {
|
|
34
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
35
|
+
prevPage: null,
|
|
36
|
+
nextPage: null,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const { container } = renderWithTheme(<PageNavigation />);
|
|
40
|
+
|
|
41
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders with next page only', () => {
|
|
45
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
46
|
+
prevPage: null,
|
|
47
|
+
nextPage: { type: 'link', label: 'The Next Page', link: 'https://next-page' },
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const { container } = renderWithTheme(<PageNavigation />);
|
|
51
|
+
|
|
52
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { renderWithTheme } from '../../../tests/utils';
|
|
4
|
+
|
|
5
|
+
import { PreviousPageLink } from '@theme/PageNavigation/PreviousPageLink';
|
|
6
|
+
import { usePageData } from '@portal/hooks/usePageData';
|
|
7
|
+
|
|
8
|
+
jest.mock('@portal/hooks/usePageData');
|
|
9
|
+
|
|
10
|
+
describe('PreviousPageLink', () => {
|
|
11
|
+
it('renders when prevPage is null', () => {
|
|
12
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({ prevPage: null, nextPage: null });
|
|
13
|
+
|
|
14
|
+
const { container } = renderWithTheme(<PreviousPageLink />);
|
|
15
|
+
|
|
16
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('renders when prevPage exists', () => {
|
|
20
|
+
(usePageData as jest.MockedFn<any>).mockReturnValue({
|
|
21
|
+
prevPage: { type: 'link', label: 'The Previous Page', link: 'https://test.com' },
|
|
22
|
+
nextPage: null,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const { container } = renderWithTheme(<PreviousPageLink />);
|
|
26
|
+
|
|
27
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`NextPageLink renders when nextPage exists 1`] = `
|
|
4
|
+
.c1 {
|
|
5
|
+
-webkit-text-decoration: none;
|
|
6
|
+
text-decoration: none;
|
|
7
|
+
text-align: center;
|
|
8
|
+
width: auto;
|
|
9
|
+
outline: none;
|
|
10
|
+
border: none;
|
|
11
|
+
border-radius: var(--button-border-radius);
|
|
12
|
+
font-weight: var(--button-font-weight);
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
padding: 2px 20px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
-webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
17
|
+
transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
font-family: var(--button-font-family);
|
|
20
|
+
box-shadow: var(--button-box-shadow);
|
|
21
|
+
color: var(--button-background-color);
|
|
22
|
+
border: 2px solid var(--button-background-color);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
font-size: var(--button-large-font-size);
|
|
25
|
+
padding: var(--button-large-padding);
|
|
26
|
+
min-width: var(--button-large-min-width);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.c1:hover {
|
|
30
|
+
box-shadow: var(--button-active-box-shadow);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.c1:active {
|
|
34
|
+
box-shadow: var(--button-active-box-shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.c1:hover {
|
|
38
|
+
border: 2px solid var(--button-active-background-color);
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.c1:active {
|
|
43
|
+
border: 2px solid var(--button-outlined-active-border-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c0 + .c0 {
|
|
47
|
+
margin-left: 0.85em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
<a
|
|
51
|
+
class="c0 c1 button-color-default"
|
|
52
|
+
data-component-name="ui/Button"
|
|
53
|
+
href="https://test.com"
|
|
54
|
+
role="button"
|
|
55
|
+
to="https://test.com"
|
|
56
|
+
variant="outlined"
|
|
57
|
+
>
|
|
58
|
+
Next to
|
|
59
|
+
The Next Page
|
|
60
|
+
</a>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`NextPageLink renders when nextPage is null 1`] = `
|
|
64
|
+
<div>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`PageNavigation renders 1`] = `
|
|
4
|
+
.c2 {
|
|
5
|
+
-webkit-text-decoration: none;
|
|
6
|
+
text-decoration: none;
|
|
7
|
+
text-align: center;
|
|
8
|
+
width: auto;
|
|
9
|
+
outline: none;
|
|
10
|
+
border: none;
|
|
11
|
+
border-radius: var(--button-border-radius);
|
|
12
|
+
font-weight: var(--button-font-weight);
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
padding: 2px 20px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
-webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
17
|
+
transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
font-family: var(--button-font-family);
|
|
20
|
+
box-shadow: var(--button-box-shadow);
|
|
21
|
+
color: var(--button-background-color);
|
|
22
|
+
border: 2px solid var(--button-background-color);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
font-size: var(--button-large-font-size);
|
|
25
|
+
padding: var(--button-large-padding);
|
|
26
|
+
min-width: var(--button-large-min-width);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.c2:hover {
|
|
30
|
+
box-shadow: var(--button-active-box-shadow);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.c2:active {
|
|
34
|
+
box-shadow: var(--button-active-box-shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.c2:hover {
|
|
38
|
+
border: 2px solid var(--button-active-background-color);
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.c2:active {
|
|
43
|
+
border: 2px solid var(--button-outlined-active-border-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c1 + .c1 {
|
|
47
|
+
margin-left: 0.85em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.c0 {
|
|
51
|
+
display: -webkit-box;
|
|
52
|
+
display: -webkit-flex;
|
|
53
|
+
display: -ms-flexbox;
|
|
54
|
+
display: flex;
|
|
55
|
+
-webkit-box-pack: justify;
|
|
56
|
+
-webkit-justify-content: space-between;
|
|
57
|
+
-ms-flex-pack: justify;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
margin: 25px 0px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
<div
|
|
63
|
+
class="c0"
|
|
64
|
+
data-component-name="PageNavigation/PageNavigation"
|
|
65
|
+
>
|
|
66
|
+
<a
|
|
67
|
+
class="c1 c2 button-color-default"
|
|
68
|
+
data-component-name="ui/Button"
|
|
69
|
+
href="https://previous-page"
|
|
70
|
+
role="button"
|
|
71
|
+
to="https://previous-page"
|
|
72
|
+
variant="outlined"
|
|
73
|
+
>
|
|
74
|
+
Back to
|
|
75
|
+
The Previous Page
|
|
76
|
+
</a>
|
|
77
|
+
<a
|
|
78
|
+
class="c1 c2 button-color-default"
|
|
79
|
+
data-component-name="ui/Button"
|
|
80
|
+
href="https://next-page"
|
|
81
|
+
role="button"
|
|
82
|
+
to="https://next-page"
|
|
83
|
+
variant="outlined"
|
|
84
|
+
>
|
|
85
|
+
Next to
|
|
86
|
+
The Next Page
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`PageNavigation renders with missing next and previous pages 1`] = `
|
|
92
|
+
.c0 {
|
|
93
|
+
display: -webkit-box;
|
|
94
|
+
display: -webkit-flex;
|
|
95
|
+
display: -ms-flexbox;
|
|
96
|
+
display: flex;
|
|
97
|
+
-webkit-box-pack: justify;
|
|
98
|
+
-webkit-justify-content: space-between;
|
|
99
|
+
-ms-flex-pack: justify;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
margin: 25px 0px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
<div
|
|
105
|
+
class="c0"
|
|
106
|
+
data-component-name="PageNavigation/PageNavigation"
|
|
107
|
+
>
|
|
108
|
+
<div>
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`PageNavigation renders with next page only 1`] = `
|
|
118
|
+
.c2 {
|
|
119
|
+
-webkit-text-decoration: none;
|
|
120
|
+
text-decoration: none;
|
|
121
|
+
text-align: center;
|
|
122
|
+
width: auto;
|
|
123
|
+
outline: none;
|
|
124
|
+
border: none;
|
|
125
|
+
border-radius: var(--button-border-radius);
|
|
126
|
+
font-weight: var(--button-font-weight);
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
padding: 2px 20px;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
-webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
131
|
+
transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
132
|
+
line-height: 1;
|
|
133
|
+
font-family: var(--button-font-family);
|
|
134
|
+
box-shadow: var(--button-box-shadow);
|
|
135
|
+
color: var(--button-background-color);
|
|
136
|
+
border: 2px solid var(--button-background-color);
|
|
137
|
+
background-color: transparent;
|
|
138
|
+
font-size: var(--button-large-font-size);
|
|
139
|
+
padding: var(--button-large-padding);
|
|
140
|
+
min-width: var(--button-large-min-width);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.c2:hover {
|
|
144
|
+
box-shadow: var(--button-active-box-shadow);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.c2:active {
|
|
148
|
+
box-shadow: var(--button-active-box-shadow);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.c2:hover {
|
|
152
|
+
border: 2px solid var(--button-active-background-color);
|
|
153
|
+
background-color: transparent;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.c2:active {
|
|
157
|
+
border: 2px solid var(--button-outlined-active-border-color);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.c1 + .c1 {
|
|
161
|
+
margin-left: 0.85em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.c0 {
|
|
165
|
+
display: -webkit-box;
|
|
166
|
+
display: -webkit-flex;
|
|
167
|
+
display: -ms-flexbox;
|
|
168
|
+
display: flex;
|
|
169
|
+
-webkit-box-pack: justify;
|
|
170
|
+
-webkit-justify-content: space-between;
|
|
171
|
+
-ms-flex-pack: justify;
|
|
172
|
+
justify-content: space-between;
|
|
173
|
+
margin: 25px 0px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
<div
|
|
177
|
+
class="c0"
|
|
178
|
+
data-component-name="PageNavigation/PageNavigation"
|
|
179
|
+
>
|
|
180
|
+
<div>
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
<a
|
|
184
|
+
class="c1 c2 button-color-default"
|
|
185
|
+
data-component-name="ui/Button"
|
|
186
|
+
href="https://next-page"
|
|
187
|
+
role="button"
|
|
188
|
+
to="https://next-page"
|
|
189
|
+
variant="outlined"
|
|
190
|
+
>
|
|
191
|
+
Next to
|
|
192
|
+
The Next Page
|
|
193
|
+
</a>
|
|
194
|
+
</div>
|
|
195
|
+
`;
|
|
196
|
+
|
|
197
|
+
exports[`PageNavigation renders with previous page only 1`] = `
|
|
198
|
+
.c2 {
|
|
199
|
+
-webkit-text-decoration: none;
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
text-align: center;
|
|
202
|
+
width: auto;
|
|
203
|
+
outline: none;
|
|
204
|
+
border: none;
|
|
205
|
+
border-radius: var(--button-border-radius);
|
|
206
|
+
font-weight: var(--button-font-weight);
|
|
207
|
+
font-size: 14px;
|
|
208
|
+
padding: 2px 20px;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
-webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
211
|
+
transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
212
|
+
line-height: 1;
|
|
213
|
+
font-family: var(--button-font-family);
|
|
214
|
+
box-shadow: var(--button-box-shadow);
|
|
215
|
+
color: var(--button-background-color);
|
|
216
|
+
border: 2px solid var(--button-background-color);
|
|
217
|
+
background-color: transparent;
|
|
218
|
+
font-size: var(--button-large-font-size);
|
|
219
|
+
padding: var(--button-large-padding);
|
|
220
|
+
min-width: var(--button-large-min-width);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.c2:hover {
|
|
224
|
+
box-shadow: var(--button-active-box-shadow);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.c2:active {
|
|
228
|
+
box-shadow: var(--button-active-box-shadow);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.c2:hover {
|
|
232
|
+
border: 2px solid var(--button-active-background-color);
|
|
233
|
+
background-color: transparent;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.c2:active {
|
|
237
|
+
border: 2px solid var(--button-outlined-active-border-color);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.c1 + .c1 {
|
|
241
|
+
margin-left: 0.85em;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.c0 {
|
|
245
|
+
display: -webkit-box;
|
|
246
|
+
display: -webkit-flex;
|
|
247
|
+
display: -ms-flexbox;
|
|
248
|
+
display: flex;
|
|
249
|
+
-webkit-box-pack: justify;
|
|
250
|
+
-webkit-justify-content: space-between;
|
|
251
|
+
-ms-flex-pack: justify;
|
|
252
|
+
justify-content: space-between;
|
|
253
|
+
margin: 25px 0px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
<div
|
|
257
|
+
class="c0"
|
|
258
|
+
data-component-name="PageNavigation/PageNavigation"
|
|
259
|
+
>
|
|
260
|
+
<a
|
|
261
|
+
class="c1 c2 button-color-default"
|
|
262
|
+
data-component-name="ui/Button"
|
|
263
|
+
href="https://previous-page"
|
|
264
|
+
role="button"
|
|
265
|
+
to="https://previous-page"
|
|
266
|
+
variant="outlined"
|
|
267
|
+
>
|
|
268
|
+
Back to
|
|
269
|
+
The Previous Page
|
|
270
|
+
</a>
|
|
271
|
+
<div>
|
|
272
|
+
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
`;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`PreviousPageLink renders when prevPage exists 1`] = `
|
|
4
|
+
.c1 {
|
|
5
|
+
-webkit-text-decoration: none;
|
|
6
|
+
text-decoration: none;
|
|
7
|
+
text-align: center;
|
|
8
|
+
width: auto;
|
|
9
|
+
outline: none;
|
|
10
|
+
border: none;
|
|
11
|
+
border-radius: var(--button-border-radius);
|
|
12
|
+
font-weight: var(--button-font-weight);
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
padding: 2px 20px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
-webkit-transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
17
|
+
transition: background-color 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
font-family: var(--button-font-family);
|
|
20
|
+
box-shadow: var(--button-box-shadow);
|
|
21
|
+
color: var(--button-background-color);
|
|
22
|
+
border: 2px solid var(--button-background-color);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
font-size: var(--button-large-font-size);
|
|
25
|
+
padding: var(--button-large-padding);
|
|
26
|
+
min-width: var(--button-large-min-width);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.c1:hover {
|
|
30
|
+
box-shadow: var(--button-active-box-shadow);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.c1:active {
|
|
34
|
+
box-shadow: var(--button-active-box-shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.c1:hover {
|
|
38
|
+
border: 2px solid var(--button-active-background-color);
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.c1:active {
|
|
43
|
+
border: 2px solid var(--button-outlined-active-border-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c0 + .c0 {
|
|
47
|
+
margin-left: 0.85em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
<a
|
|
51
|
+
class="c0 c1 button-color-default"
|
|
52
|
+
data-component-name="ui/Button"
|
|
53
|
+
href="https://test.com"
|
|
54
|
+
role="button"
|
|
55
|
+
to="https://test.com"
|
|
56
|
+
variant="outlined"
|
|
57
|
+
>
|
|
58
|
+
Back to
|
|
59
|
+
The Previous Page
|
|
60
|
+
</a>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`PreviousPageLink renders when prevPage is null 1`] = `
|
|
64
|
+
<div>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
package/src/Panel/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
1
|
+
export * from '@theme/Panel/CodePanel';
|
|
2
|
+
export * from '@theme/Panel/ContentPanel';
|
|
3
|
+
export * from '@theme/Panel/DarkHeader';
|
|
4
|
+
export * from '@theme/Panel/Panel';
|
|
5
|
+
export * from '@theme/Panel/PanelBody';
|
|
6
|
+
export * from '@theme/Panel/PanelComponent';
|
|
7
|
+
export * from '@theme/Panel/PanelHeader';
|
|
8
|
+
export * from '@theme/Panel/PanelHeaderTitle';
|
|
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
|
4
4
|
import { SampleControls, SamplesControlButton } from '@theme/SamplesPanelControls';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Samples Control Button',
|
|
7
|
+
title: 'Components/Samples Control Button',
|
|
8
8
|
component: SamplesControlButton,
|
|
9
9
|
} as ComponentMeta<typeof SamplesControlButton>;
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/SamplesPanelControls/SamplesPanelControls';
|
package/src/Search/ClearIcon.tsx
CHANGED
|
@@ -2,18 +2,17 @@ import React, { SVGProps } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
const Icon = (props: SVGProps<SVGSVGElement>) => (
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</span>
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
version="1.1"
|
|
8
|
+
x="0"
|
|
9
|
+
y="0"
|
|
10
|
+
viewBox="0 0 298.7 298.7"
|
|
11
|
+
data-component-name="Search/ClearIcon"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<polygon points="298.7 30.2 268.5 0 149.3 119.1 30.2 0 0 30.2 119.1 149.3 0 268.5 30.2 298.7 149.3 179.5 268.5 298.7 298.7 268.5 179.5 149.3 " />
|
|
15
|
+
</svg>
|
|
17
16
|
);
|
|
18
17
|
|
|
19
18
|
export const ClearIcon = styled(Icon)`
|