import React from 'react';
import { preview__Tearsheet as Tearsheet } from '@carbon/ibm-products';
import { Button, Form, FormGroup, TextInput } from '@carbon/react';
// Test 1: Simple Tearsheet with title and actions
function SimpleTearsheet() {
return (
{}}>
{} },
{ label: 'Submit', onClick: () => {} },
]} />
);
}
// Test 2: Tearsheet with influencer
function TearsheetWithInfluencer() {
return (
{}} influencerWidth="narrow">
Influencer content
Main content
);
}
// Test 3: Tearsheet with navigation
function TearsheetWithNavigation() {
return (
{}}>
Navigation tabs
Content
{} }]} />
);
}
// Test 4: Tearsheet with headerActions
function TearsheetWithHeaderActions() {
return (
{}}>
Action}>
Content
);
}
// Test 5: Tearsheet with deprecated slug prop
function TearsheetWithSlug() {
return (
{}} decorator={Slug content
}>
Content
);
}
// Test 6: Tearsheet with all features
function CompleteTearsheet() {
return (
{}}
decorator={Decorator
}
influencerWidth="wide"
preventCloseOnClickOutside={true}
variant="wide">
Header Action}>
Influencer
Navigation
{} },
{ label: 'Submit', onClick: () => {} },
]} />
);
}
// Test 7: Minimal Tearsheet (no header props)
function MinimalTearsheet() {
return (
{}}>
Just content
);
}
// Test 8: Tearsheet with deprecated influencerPosition (should be removed)
function TearsheetWithInfluencerPosition() {
return (
{}}>
Influencer
Content
);
}
// Test 9: Stacked Tearsheets (multiple tearsheets)
function StackedTearsheets() {
const [open1, setOpen1] = React.useState(false);
const [open2, setOpen2] = React.useState(false);
return (<>
setOpen1(false)}>
Content 1
setOpen1(false) }]} />
setOpen2(false)}>
Content 2
setOpen2(false) }]} />
>);
}
// Test 10: Tearsheet with spread props
function TearsheetWithSpreadProps() {
const commonProps = {
open: true,
onClose: () => {},
variant: 'wide',
};
return (
Content
);
}
// Test 11: Tearsheet with complex children
function TearsheetWithComplexChildren() {
return (
{}}>
{} }]} />
);
}
// Test 12: Tearsheet with only decorator (no other header props)
function TearsheetWithOnlyDecorator() {
return (
{}} decorator={Decorator
}>
Content
);
}