@@ -13,14 +13,14 @@ import {
1313 ColorSchemaTable ,
1414} from '../decorators' ;
1515import { Divider } from '../divider' ;
16- import { Grid } from '../grid' ;
17- import { Cell } from '../grid/cell.component' ;
16+ import { Cell , Grid } from '../grid' ;
1817
1918import { AssetInput } from './asset-input.component' ;
2019import { invalidState , validState } from './asset-input.fixtures' ;
2120import { MaxButton } from './max-button.component' ;
21+ import { SimpleAssetInput } from './simple-asset-input.component' ;
2222
23- import type { Asset , AssetState } from './asset-input.data' ;
23+ import type { AssetWithFiat , AssetState } from './asset-input.data' ;
2424
2525const subtitle = `` ;
2626
@@ -61,7 +61,12 @@ export const Overview = (): JSX.Element => (
6161 < Cell >
6262 < Section title = "Overview" >
6363 < Variants . Table
64- headers = { [ 'Browser view — simple' , 'Browser view — simple + error' ] }
64+ headers = { [
65+ 'Complex — valid' ,
66+ 'Complex — invalid' ,
67+ 'Simple - valid' ,
68+ 'Simple - invalid' ,
69+ ] }
6570 >
6671 < Variants . Row >
6772 < Variants . Cell >
@@ -70,6 +75,18 @@ export const Overview = (): JSX.Element => (
7075 < Variants . Cell >
7176 < AssetInput state = { invalidState ( '1' ) } />
7277 </ Variants . Cell >
78+ < Variants . Cell >
79+ < SimpleAssetInput
80+ state = { validState ( '1' ) }
81+ balanceLabel = "Balance Available"
82+ />
83+ </ Variants . Cell >
84+ < Variants . Cell >
85+ < SimpleAssetInput
86+ state = { invalidState ( '1' ) }
87+ balanceLabel = "Balance Available"
88+ />
89+ </ Variants . Cell >
7390 </ Variants . Row >
7491 </ Variants . Table >
7592 </ Section >
@@ -105,14 +122,17 @@ type Interactions = ComponentStory<typeof AssetInput>;
105122export const Interactions : Interactions = ( ) : JSX . Element => {
106123 const [ state , setState ] = useState < AssetState > ( validState ( '1' ) ) ;
107124
108- const onTickerClick = ( asset : Readonly < Asset > ) : void => {
125+ const onTickerClick = ( asset : Readonly < AssetWithFiat > ) : void => {
109126 setState ( currentState => ( {
110127 ...currentState ,
111128 asset : { ...currentState . asset , ticker : `Token ${ asset . id } ` } ,
112129 } ) ) ;
113130 } ;
114131
115- const onAmountChange = ( asset : Readonly < Asset > , amount : string ) : void => {
132+ const onAmountChange = (
133+ asset : Readonly < AssetWithFiat > ,
134+ amount : string ,
135+ ) : void => {
116136 setState ( currentState => {
117137 if ( currentState . asset . id !== asset . id ) {
118138 return currentState ;
@@ -141,7 +161,7 @@ export const Interactions: Interactions = (): JSX.Element => {
141161 } ) ;
142162 } ;
143163
144- const onMaxClick = ( asset : Readonly < Asset > ) : void => {
164+ const onMaxClick = ( asset : Readonly < AssetWithFiat > ) : void => {
145165 setState ( currentState => {
146166 return {
147167 ...currentState ,
0 commit comments