11import type { Meta , StoryObj } from '@storybook/react-vite' ;
22import {
33 InputGroup ,
4+ InputGroupAddon ,
45 InputGroupButton ,
56 InputGroupInput ,
6- InputGroupText ,
77 Label ,
88 Stack ,
99} from '@trycompai/ui-shadcn' ;
@@ -25,9 +25,9 @@ export const WithIconLeft: Story = {
2525 render : ( ) => (
2626 < div className = "w-[300px]" >
2727 < InputGroup >
28- < InputGroupText >
29- < Search className = "h-4 w-4" />
30- </ InputGroupText >
28+ < InputGroupAddon align = "inline-start" >
29+ < Search />
30+ </ InputGroupAddon >
3131 < InputGroupInput placeholder = "Search..." />
3232 </ InputGroup >
3333 </ div >
@@ -39,9 +39,9 @@ export const WithIconRight: Story = {
3939 < div className = "w-[300px]" >
4040 < InputGroup >
4141 < InputGroupInput placeholder = "Enter email" />
42- < InputGroupText >
43- < Mail className = "h-4 w-4" />
44- </ InputGroupText >
42+ < InputGroupAddon align = "inline-end" >
43+ < Mail />
44+ </ InputGroupAddon >
4545 </ InputGroup >
4646 </ div >
4747 ) ,
@@ -51,7 +51,7 @@ export const WithPrefix: Story = {
5151 render : ( ) => (
5252 < div className = "w-[300px]" >
5353 < InputGroup >
54- < InputGroupText > https://</ InputGroupText >
54+ < InputGroupAddon align = "inline-start" > https://</ InputGroupAddon >
5555 < InputGroupInput placeholder = "example.com" />
5656 </ InputGroup >
5757 </ div >
@@ -63,7 +63,7 @@ export const WithSuffix: Story = {
6363 < div className = "w-[300px]" >
6464 < InputGroup >
6565 < InputGroupInput placeholder = "Username" />
66- < InputGroupText > @company.com</ InputGroupText >
66+ < InputGroupAddon align = "inline-end" > @company.com</ InputGroupAddon >
6767 </ InputGroup >
6868 </ div >
6969 ) ,
@@ -73,11 +73,11 @@ export const Currency: Story = {
7373 render : ( ) => (
7474 < div className = "w-[200px]" >
7575 < InputGroup >
76- < InputGroupText >
77- < DollarSign className = "h-4 w-4" />
78- </ InputGroupText >
76+ < InputGroupAddon align = "inline-start" >
77+ < DollarSign />
78+ </ InputGroupAddon >
7979 < InputGroupInput type = "number" placeholder = "0.00" />
80- < InputGroupText > USD</ InputGroupText >
80+ < InputGroupAddon align = "inline-end" > USD</ InputGroupAddon >
8181 </ InputGroup >
8282 </ div >
8383 ) ,
@@ -89,7 +89,7 @@ export const WithButton: Story = {
8989 < InputGroup >
9090 < InputGroupInput defaultValue = "https://example.com/share/abc123" readOnly />
9191 < InputGroupButton >
92- < Copy className = "h-4 w-4 mr-2" />
92+ < Copy />
9393 Copy
9494 </ InputGroupButton >
9595 </ InputGroup >
@@ -104,27 +104,27 @@ export const AllExamples: Story = {
104104 < Stack gap = "2" >
105105 < Label > Search</ Label >
106106 < InputGroup >
107- < InputGroupText >
108- < Search className = "h-4 w-4" />
109- </ InputGroupText >
107+ < InputGroupAddon align = "inline-start" >
108+ < Search />
109+ </ InputGroupAddon >
110110 < InputGroupInput placeholder = "Search..." />
111111 </ InputGroup >
112112 </ Stack >
113113
114114 < Stack gap = "2" >
115115 < Label > Website</ Label >
116116 < InputGroup >
117- < InputGroupText > https://</ InputGroupText >
117+ < InputGroupAddon align = "inline-start" > https://</ InputGroupAddon >
118118 < InputGroupInput placeholder = "example.com" />
119119 </ InputGroup >
120120 </ Stack >
121121
122122 < Stack gap = "2" >
123123 < Label > Price</ Label >
124124 < InputGroup >
125- < InputGroupText > $</ InputGroupText >
125+ < InputGroupAddon align = "inline-start" > $</ InputGroupAddon >
126126 < InputGroupInput type = "number" placeholder = "0.00" />
127- < InputGroupText > USD</ InputGroupText >
127+ < InputGroupAddon align = "inline-end" > USD</ InputGroupAddon >
128128 </ InputGroup >
129129 </ Stack >
130130 </ Stack >
0 commit comments