Skip to content

Commit

Permalink
Small example adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Sep 28, 2024
1 parent c954f3c commit 249fbd6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,26 @@ export const WithCustomReturnStatus = () => {
variant="confirmation"
title="Dialog confirmation title"
description="Some content describing the situation."
alignContent="left"
{...connectWithDialog}
>
<Section
variant="info"
innerSpace={{ top: true, bottom: true }}
top
>
<Form.Isolation
onChange={console.log}
data={{
foo: submitState ? submitState.customStatus : 'bar',
}}
>
<Flex.Stack>
<Field.String label="Inside the dialog" path="/foo" />
</Form.Isolation>
<Form.Isolation
onChange={console.log}
data={{
bar: submitState
? submitState.customStatus
: 'bar',
}}
>
<Field.String label="Isolated" path="/bar" />
</Form.Isolation>
</Flex.Stack>
</Section>
</Dialog>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export function SubmitConfirmation() {
setConfirmationState('readyToBeSubmitted')
}
}}
renderWithState={({ confirmationState, connectWithDialog }) => {
renderWithState={({
submitState,
confirmationState,
connectWithDialog,
}) => {
let content = null

switch (confirmationState) {
Expand All @@ -63,13 +67,19 @@ export function SubmitConfirmation() {
innerSpace={{ top: true, bottom: true }}
top
>
<Form.Isolation onChange={console.log}>
<Field.String
label="Inside the dialog"
path="/bar"
defaultValue="bar"
/>
</Form.Isolation>
<Flex.Stack>
<Field.String label="Inside the dialog" path="/foo" />
<Form.Isolation
onChange={console.log}
data={{
bar: submitState
? submitState.customStatus
: 'bar',
}}
>
<Field.String label="Isolated" path="/bar" />
</Form.Isolation>
</Flex.Stack>
</Section>
</Dialog>
</>
Expand Down

0 comments on commit 249fbd6

Please sign in to comment.