@carbon-labs/react-example-button 0.7.0 → 0.9.0
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/es/components/ExampleButton.js +1 -1
- package/lib/components/ExampleButton.js +1 -1
- package/lib/es/components/ExampleButton.d.ts +8 -0
- package/lib/es/index.d.ts +1 -0
- package/package.json +4 -5
- package/es/node_modules/@carbon-labs/utilities/es/usePrefix.js +0 -20
- package/lib/node_modules/@carbon-labs/utilities/es/usePrefix.js +0 -23
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Button } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
|
|
12
12
|
/** Primary UI component for user interaction */
|
|
13
13
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
var React = require('react');
|
|
11
11
|
var react = require('@carbon/react');
|
|
12
|
-
var usePrefix = require('
|
|
12
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
13
13
|
|
|
14
14
|
/** Primary UI component for user interaction */
|
|
15
15
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Primary UI component for user interaction */
|
|
2
|
+
export function ExampleButton({ children, ...rest }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
children?: string | undefined;
|
|
5
|
+
}): React.DetailedReactHTMLElement<{
|
|
6
|
+
className: string;
|
|
7
|
+
}, HTMLElement>;
|
|
8
|
+
import React from 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExampleButton } from "./components/ExampleButton.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-example-button",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
6
|
-
"provenance": true
|
|
5
|
+
"access": "public"
|
|
7
6
|
},
|
|
8
7
|
"type": "module",
|
|
9
8
|
"description": "Carbon Labs - Example Button",
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
"clean": "rimraf es lib scss"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@carbon-labs/utilities": "
|
|
35
|
+
"@carbon-labs/utilities": "0.20.0"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "5a2b169a20dcc28ec75a593e9a7f8bdae96cc50d"
|
|
39
38
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
const PrefixContext = /*#__PURE__*/React.createContext('clabs');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Sets the prefix context
|
|
14
|
-
* @returns context value
|
|
15
|
-
*/
|
|
16
|
-
function usePrefix() {
|
|
17
|
-
return React.useContext(PrefixContext);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { PrefixContext, usePrefix };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
var React = require('react');
|
|
11
|
-
|
|
12
|
-
const PrefixContext = /*#__PURE__*/React.createContext('clabs');
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Sets the prefix context
|
|
16
|
-
* @returns context value
|
|
17
|
-
*/
|
|
18
|
-
function usePrefix() {
|
|
19
|
-
return React.useContext(PrefixContext);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
exports.PrefixContext = PrefixContext;
|
|
23
|
-
exports.usePrefix = usePrefix;
|