Skip to content

Commit 8e93bcc

Browse files
authored
Refactor to define a single wrap method (#91)
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
1 parent ac784ad commit 8e93bcc

File tree

46 files changed

+142
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+142
-283
lines changed

packages/lab-example/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
},
1515
"license": "BSD-3-Clause",
1616
"author": {
17-
"name": "Jupyter Developer Team",
18-
"email": ""
17+
"name": "Jupyter Developer Team"
1918
},
2019
"files": [
2120
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",

packages/react-components/src/accordion-item/index.tsx renamed to packages/react-components/src/accordion-item/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import {
5-
provideJupyterDesignSystem,
6-
jpAccordionItem
7-
} from '@jupyter/web-components';
8-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9-
import React from 'react';
10-
11-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpAccordionItem } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
127

138
export const AccordionItem: React.DetailedHTMLFactory<
149
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/accordion/index.tsx renamed to packages/react-components/src/accordion/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import {
5-
provideJupyterDesignSystem,
6-
jpAccordion
7-
} from '@jupyter/web-components';
8-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9-
import React from 'react';
10-
11-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpAccordion } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
127

138
export const Accordion: React.DetailedHTMLFactory<
149
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/anchor/index.tsx renamed to packages/react-components/src/anchor/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { provideJupyterDesignSystem, jpAnchor } from '@jupyter/web-components';
5-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6-
import React from 'react';
7-
8-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpAnchor } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
97

108
export const Anchor: React.DetailedHTMLFactory<
119
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/anchored-region/index.tsx renamed to packages/react-components/src/anchored-region/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import {
5-
provideJupyterDesignSystem,
6-
jpAnchoredRegion
7-
} from '@jupyter/web-components';
8-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9-
import React from 'react';
10-
11-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpAnchoredRegion } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
127

138
export const AnchoredRegion: React.DetailedHTMLFactory<
149
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/avatar/index.tsx renamed to packages/react-components/src/avatar/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { provideJupyterDesignSystem, jpAvatar } from '@jupyter/web-components';
5-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6-
import React from 'react';
7-
8-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpAvatar } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
97

108
export const Avatar: React.DetailedHTMLFactory<
119
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/badge/index.tsx renamed to packages/react-components/src/badge/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { provideJupyterDesignSystem, jpBadge } from '@jupyter/web-components';
5-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6-
import React from 'react';
7-
8-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpBadge } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
97

108
export const Badge: React.DetailedHTMLFactory<
119
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/breadcrumb-item/index.tsx renamed to packages/react-components/src/breadcrumb-item/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import {
5-
provideJupyterDesignSystem,
6-
jpBreadcrumbItem
7-
} from '@jupyter/web-components';
8-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9-
import React from 'react';
10-
11-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpBreadcrumbItem } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
127

138
export const BreadcrumbItem: React.DetailedHTMLFactory<
149
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/breadcrumb/index.tsx renamed to packages/react-components/src/breadcrumb/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import {
5-
provideJupyterDesignSystem,
6-
jpBreadcrumb
7-
} from '@jupyter/web-components';
8-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9-
import React from 'react';
10-
11-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpBreadcrumb } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
127

138
export const Breadcrumb: React.DetailedHTMLFactory<
149
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/button/index.tsx renamed to packages/react-components/src/button/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { provideJupyterDesignSystem, jpButton } from '@jupyter/web-components';
5-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6-
import React from 'react';
7-
8-
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
4+
import { jpButton } from '@jupyter/web-components';
5+
import type React from 'react';
6+
import { wrap } from '../wrap';
97

108
export const Button: React.DetailedHTMLFactory<
119
React.HTMLAttributes<HTMLElement> & {

0 commit comments

Comments
 (0)