File tree 2 files changed +11
-43
lines changed
2 files changed +11
-43
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,7 @@ import { AddressInfo } from './address-info';
4
4
import { CardDef , field , contains } from ' https://cardstack.com/base/card-api' ;
5
5
import { Component } from ' https://cardstack.com/base/card-api' ;
6
6
import StringField from ' https://cardstack.com/base/string' ;
7
- import {
8
- FieldContainer ,
9
- CardContainer ,
10
- IconButton ,
11
- } from ' @cardstack/boxel-ui/components' ;
12
- import { Sparkle } from ' @cardstack/boxel-ui/icons' ;
7
+ import { FieldContainer , CardContainer } from ' @cardstack/boxel-ui/components' ;
13
8
14
9
class Isolated extends Component <typeof ContactForm > {
15
10
get hasTitleField() {
@@ -25,15 +20,6 @@ class Isolated extends Component<typeof ContactForm> {
25
20
{{/if }}
26
21
27
22
<div class =' card-form-display' >
28
- <IconButton
29
- @ icon ={{Sparkle }}
30
- @ width =' 22px'
31
- @ height =' 22px'
32
- @ variant =' undefined'
33
- class =' icon-profile'
34
- aria-label =' Profile'
35
- />
36
-
37
23
<div class =' contact-form-details' >
38
24
39
25
<div class =' field-input' >
@@ -149,14 +135,6 @@ class Isolated extends Component<typeof ContactForm> {
149
135
class View extends Component <typeof ContactForm > {
150
136
<template >
151
137
<CardContainer @ displayBoundaries ={{ true }} class =' container' >
152
- <IconButton
153
- @ icon ={{Sparkle }}
154
- @ width =' 22px'
155
- @ height =' 22px'
156
- @ variant =' undefined'
157
- class =' icon-profile'
158
- aria-label =' Profile'
159
- />
160
138
<div class =' content' >
161
139
<label >User</label >
162
140
<h2 ><@ fields.name /></h2 >
@@ -200,7 +178,9 @@ class Edit extends Component<typeof ContactForm> {
200
178
<@ fields.name />
201
179
</FieldContainer >
202
180
203
- <@ fields.email />
181
+ <FieldContainer @ tag =' label' @ label =' Email' @ vertical ={{ true }} >
182
+ <@ fields.email />
183
+ </FieldContainer >
204
184
205
185
<FieldContainer @ tag =' label' @ label =' Phone' @ vertical ={{ true }} >
206
186
<@ fields.phone />
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
11
11
StringField ,
12
12
} from ' https://cardstack.com/base/card-api' ;
13
13
import { Component } from ' https://cardstack.com/base/card-api' ;
14
- import { BoxelInput , FieldContainer } from ' @cardstack/boxel-ui/components' ;
14
+ import { BoxelInput } from ' @cardstack/boxel-ui/components' ;
15
15
import { TextInputValidator } from ' ../base/text-input-validator' ;
16
16
17
17
function isValidEmail(email : string ): boolean {
@@ -74,24 +74,12 @@ class View extends Component<typeof UserEmail> {
74
74
75
75
class Edit extends Component <typeof UserEmail > {
76
76
<template >
77
- <FieldContainer @ tag =' label' @ label =' Email' @ vertical ={{ true }} >
78
- <BoxelInput
79
- @ value ={{this .textInputValidator.asString }}
80
- @ onInput ={{this .textInputValidator.onInput }}
81
- @ errorMessage ={{this .textInputValidator.errorMessage }}
82
- @ state ={{if this . textInputValidator.isInvalid ' invalid' ' none' }}
83
- />
84
- </FieldContainer >
85
-
86
- <style >
87
- .card-container {
88
- padding : 2rem 1rem ;
89
- display : grid ;
90
- gap : var (--boxel-sp-sm );
91
- grid-template-columns : 1fr ;
92
- background-color : #eeeeee50 ;
93
- }
94
- < /style >
77
+ <BoxelInput
78
+ @ value ={{this .textInputValidator.asString }}
79
+ @ onInput ={{this .textInputValidator.onInput }}
80
+ @ errorMessage ={{this .textInputValidator.errorMessage }}
81
+ @ state ={{if this . textInputValidator.isInvalid ' invalid' ' none' }}
82
+ />
95
83
</template >
96
84
97
85
textInputValidator: TextInputValidator <string > = new TextInputValidator (
You can’t perform that action at this time.
0 commit comments