Skip to content

Commit

Permalink
Update Modals.demo.textInput.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
pfo-omicsstudio committed Dec 1, 2024
1 parent a2c24cb commit 8a67500
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions packages/@docs/demos/src/demos/modals/Modals.demo.textInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,8 @@ function Demo() {
modals.openTextInputModal({
modalId: 'test-id',
title: 'Please enter your name',
children: (
<Text size="sm">
Children are rendered above the input field.
</Text>
),
bottomSection: (
<Text size="sm">
But you can still render content below it.
</Text>
),
topSection: <Text size="sm">Top section is rendered here.</Text>,
bottomSection: <Text size="sm">Bottom section is rendered here.</Text>,
onCancel: () => console.log('Cancel'),
onConfirm: (value) => console.log(\`Confirm with value \${value}\`),
});
Expand All @@ -35,16 +27,8 @@ function Demo() {
modals.openTextInputModal({
modalId: 'test-id',
title: 'Please enter your name',
topSection: (
<Text size="sm">
Top section is rendered here.
</Text>
),
bottomSection: (
<Text size="sm">
Bottom section is rendered here.
</Text>
),
topSection: <Text size="sm">Top section is rendered here.</Text>,
bottomSection: <Text size="sm">Bottom section is rendered here.</Text>,
onCancel: () =>
notifications.show({
title: 'Canceled',
Expand All @@ -54,7 +38,7 @@ function Demo() {
onConfirm: (value) =>
notifications.show({
title: 'Confirmed',
message: `TextInputModal was confirmed with input ${value}`,
message: `TextInputModal was confirmed with input ${value}`,
color: 'teal',
}),
});
Expand Down

0 comments on commit 8a67500

Please sign in to comment.