@thenamespace/ens-components 0.0.7-alpha → 0.1.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/README.md CHANGED
@@ -28,13 +28,13 @@ pnpm add @arti/ui-components
28
28
 
29
29
  ```tsx
30
30
  // Import the bundled CSS
31
- import '@arti/ui-components/styles';
31
+ import "@arti/ui-components/styles";
32
32
  ```
33
33
 
34
34
  ### 2. Setup Theme Provider
35
35
 
36
36
  ```tsx
37
- import { ThemeProvider } from '@arti/ui-components';
37
+ import { ThemeProvider } from "@arti/ui-components";
38
38
 
39
39
  function App() {
40
40
  return (
@@ -48,12 +48,14 @@ function App() {
48
48
  ### 3. Use Components
49
49
 
50
50
  ```tsx
51
- import { Button, Text, Input, Tooltip } from '@arti/ui-components';
51
+ import { Button, Text, Input, Tooltip } from "@arti/ui-components";
52
52
 
53
53
  function MyComponent() {
54
54
  return (
55
55
  <div>
56
- <Text size="lg" weight="bold">Welcome!</Text>
56
+ <Text size="lg" weight="bold">
57
+ Welcome!
58
+ </Text>
57
59
  <Button variant="solid" prefix={<Icon name="check-circle" />}>
58
60
  Get Started
59
61
  </Button>
@@ -69,6 +71,7 @@ function MyComponent() {
69
71
  ## Available Components
70
72
 
71
73
  ### Atoms
74
+
72
75
  - **Button** - Interactive button with variants and icons
73
76
  - **Input** - Form input with prefix/suffix support
74
77
  - **Text** - Typography component with size and weight options
@@ -77,11 +80,13 @@ function MyComponent() {
77
80
  - **Tooltip** - Contextual tooltip component
78
81
 
79
82
  ### Molecules
83
+
80
84
  - **Alert** - Notification alert component
81
85
  - **Dropdown** - Dropdown menu component
82
86
  - **Modal** - Modal dialog component
83
87
 
84
88
  ### Complex Components
89
+
85
90
  - **PendingTransaction** - Transaction status display
86
91
  - **SelectRecordsForm** - ENS records form
87
92
  - **EnsRecordsForm** - ENS management form
@@ -89,16 +94,20 @@ function MyComponent() {
89
94
  ## Hooks
90
95
 
91
96
  ```tsx
92
- import { useTheme, useWaitForTransaction, useWeb3Clients } from '@arti/ui-components';
97
+ import {
98
+ useTheme,
99
+ useWaitForTransaction,
100
+ useWeb3Clients,
101
+ } from "@arti/ui-components";
93
102
 
94
103
  function MyComponent() {
95
104
  const { theme, setTheme, toggleTheme } = useTheme();
96
- const { data, isLoading } = useWaitForTransaction({ hash: '0x...' });
97
-
105
+ const { data, isLoading } = useWaitForTransaction({ hash: "0x..." });
106
+
98
107
  return (
99
108
  <div>
100
109
  <Button onClick={toggleTheme}>
101
- Switch to {theme === 'light' ? 'dark' : 'light'} mode
110
+ Switch to {theme === "light" ? "dark" : "light"} mode
102
111
  </Button>
103
112
  </div>
104
113
  );
@@ -108,45 +117,44 @@ function MyComponent() {
108
117
  ## Utils
109
118
 
110
119
  ```tsx
111
- import {
112
- formatAddress,
113
- parseRecords,
120
+ import {
121
+ formatAddress,
122
+ parseRecords,
114
123
  validateAddress,
115
124
  getCoinInfo,
116
- getResolverAddress
117
- } from '@arti/ui-components';
125
+ getResolverAddress,
126
+ } from "@arti/ui-components";
118
127
 
119
128
  // Format Ethereum address
120
- const shortAddress = formatAddress('0x1234567890abcdef1234567890abcdef12345678');
129
+ const shortAddress = formatAddress(
130
+ "0x1234567890abcdef1234567890abcdef12345678"
131
+ );
121
132
 
122
133
  // Parse ENS records
123
134
  const records = parseRecords(recordData);
124
135
 
125
136
  // Validate address
126
- const isValid = validateAddress('0x123...');
137
+ const isValid = validateAddress("0x123...");
127
138
  ```
128
139
 
129
140
  ## Types
130
141
 
131
142
  ```tsx
132
- import type {
133
- ButtonProps,
134
- TransactionState,
143
+ import type {
144
+ ButtonProps,
145
+ TransactionState,
135
146
  TooltipPosition,
136
- ThemeName
137
- } from '@arti/ui-components';
147
+ ThemeName,
148
+ } from "@arti/ui-components";
138
149
  ```
139
150
 
140
151
  ## Web3 Integration
141
152
 
142
153
  ```tsx
143
- import {
144
- getResolverAddress,
145
- resolverAbi
146
- } from '@arti/ui-components';
154
+ import { getResolverAddress, resolverAbi } from "@arti/ui-components";
147
155
 
148
156
  // Get resolver contract address
149
- const resolverAddress = getResolverAddress('mainnet');
157
+ const resolverAddress = getResolverAddress("mainnet");
150
158
 
151
159
  // Use ABI for contract interactions
152
160
  const contract = new ethers.Contract(resolverAddress, resolverAbi, provider);
@@ -198,4 +206,4 @@ ISC
198
206
 
199
207
  ## Contributing
200
208
 
201
- Contributions are welcome! Please feel free to submit a Pull Request.
209
+ Contributions are welcome! Please feel free to submit a Pull Request.