File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
packages/ra-ui-materialui/src/input/ArrayInput Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { ArrayInput } from './ArrayInput';
77import { SimpleFormIterator } from './SimpleFormIterator' ;
88import { TextInput } from '../TextInput' ;
99import { AdminContext } from '../../AdminContext' ;
10+ import { defaultTheme } from '../../defaultTheme' ;
1011
1112export default { title : 'ra-ui-materialui/input/SimpleFormIterator' } ;
1213
@@ -192,3 +193,40 @@ export const Sx = () => (
192193 </ Edit >
193194 </ AdminContext >
194195) ;
196+
197+ export const Theming = ( ) => (
198+ < AdminContext
199+ dataProvider = { dataProvider }
200+ theme = { {
201+ ...defaultTheme ,
202+ components : {
203+ ...defaultTheme . components ,
204+ RaSimpleFormIterator : {
205+ styleOverrides : {
206+ root : {
207+ border : 'solid lightgrey 1px' ,
208+ borderRadius : 2 ,
209+ marginTop : 24 ,
210+ padding : 8 ,
211+ '& .RaSimpleFormIterator-form' : {
212+ flexDirection : 'row' ,
213+ gap : '1em' ,
214+ } ,
215+ } ,
216+ } ,
217+ } ,
218+ } ,
219+ } }
220+ >
221+ < Edit resource = "books" id = "1" >
222+ < SimpleForm >
223+ < ArrayInput source = "authors" >
224+ < SimpleFormIterator >
225+ < TextInput source = "name" />
226+ < TextInput source = "role" />
227+ </ SimpleFormIterator >
228+ </ ArrayInput >
229+ </ SimpleForm >
230+ </ Edit >
231+ </ AdminContext >
232+ ) ;
You can’t perform that action at this time.
0 commit comments