Skip to content

Commit 57e5688

Browse files
Merge pull request #8 from heppokofrontend/feature/update
Update types and packages
2 parents 955bd7b + e8fdf99 commit 57e5688

File tree

6 files changed

+38
-45
lines changed

6 files changed

+38
-45
lines changed

@types/global.d.ts

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
import * as React from 'react';
22

3-
declare global {
4-
export type Hoge = 'hoge' | 'piyo';
5-
3+
export {};
4+
declare module 'react' {
65
// A type for the properties of a function component
7-
namespace React {
8-
interface CodeBlockHTMLAttributes<T> extends HTMLAttributes<T> {
9-
/** The accessible name of code block */
10-
label?: string | undefined;
11-
/** The Language name */
12-
language?: string | undefined;
13-
/** The flag to display the UI */
14-
controls?: boolean;
15-
}
6+
interface CodeBlockHTMLAttributes<T> extends HTMLAttributes<T> {
7+
/** The accessible name of code block */
8+
label?: string | undefined;
9+
/** The Language name */
10+
language?: string | undefined;
11+
/** The flag to display the UI */
12+
controls?: boolean;
1613
}
14+
}
15+
16+
export type CodeBlockProps = React.DetailedHTMLProps<
17+
React.HTMLAttributes<HTMLPreElement>,
18+
HTMLPreElement
19+
> & {
20+
/** The accessible name of code block */
21+
label?: string | undefined;
22+
/** The Language name */
23+
language?: string | undefined;
24+
/** The flag to display the UI */
25+
controls?: boolean;
26+
};
1727

18-
// A type for JSX markup
19-
namespace JSX {
20-
interface IntrinsicElements {
21-
'code-block': React.DetailedHTMLProps<
22-
React.HTMLAttributes<HTMLPreElement>,
23-
HTMLPreElement
24-
> & {
25-
/** The accessible name of code block */
26-
label?: string | undefined;
27-
/** The Language name */
28-
language?: string | undefined;
29-
/** The flag to display the UI */
30-
controls?: boolean;
31-
};
32-
}
28+
// A type for JSX markup
29+
declare module 'JSX' {
30+
interface IntrinsicElements {
31+
'code-block': CodeBlockProps;
3332
}
3433
}

lib/html-code-block-element.all.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/html-code-block-element.common.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/html-code-block-element.core.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 8 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@heppokofrontend/html-code-block-element",
33
"description": "Code block custom element with syntax highlighting and copy button.",
4-
"version": "2.0.1",
4+
"version": "2.0.2",
55
"author": "heppokofrontend",
66
"bugs": {
77
"url": "https://github.com/heppokofrontend/html-code-block-element/issues"
@@ -44,9 +44,6 @@
4444
"directories": {
4545
"test": "test"
4646
},
47-
"engines": {
48-
"node": "16"
49-
},
5047
"files": [
5148
"dist",
5249
"lib",

0 commit comments

Comments
 (0)