Created
August 4, 2025 23:10
-
-
Save mateusvahl/2115fdd1bf959f5a29927ab676b4398a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BlockSpacer, | |
BlockStack, | |
Card, | |
Disclosure, | |
Grid, | |
Heading, | |
Icon, | |
InlineStack, | |
Pressable, | |
View, | |
} from '@shopify/ui-extensions-react/customer-account'; | |
export const Example = () => { | |
return ( | |
<Card padding> | |
<Disclosure defaultOpen={true}> | |
<View position={{ type: 'sticky', blockStart: 0 }} background="base"> | |
<Pressable toggles="content" minInlineSize="fill"> | |
<Grid columns={['fill', 'auto']} spacing="base" blockAlignment="center"> | |
<Heading>Example</Heading> | |
<InlineStack spacing="base" blockAlignment="center"> | |
<Icon source="chevronDown" appearance="accent" /> | |
</InlineStack> | |
</Grid> | |
</Pressable> | |
</View> | |
<BlockSpacer spacing="loose" /> | |
<BlockStack spacing="base" id="content"> | |
<View background="subdued" minBlockSize={100} /> | |
<View background="subdued" minBlockSize={100} /> | |
<View background="subdued" minBlockSize={100} /> | |
<View background="subdued" minBlockSize={100} /> | |
<View background="subdued" minBlockSize={100} /> | |
</BlockStack> | |
</Disclosure> | |
</Card> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: Sticky content is behind other elements
https://gist.github.com/user-attachments/assets/0605f989-7a50-4383-bf5b-ba383a583852