Skip to content

Commit

Permalink
Testing updated transitive dep of react-remove-scroll (radix-ui#2776)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitgrelard authored Mar 14, 2024
1 parent b64b9f1 commit d312472
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/eb020608.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- primitives
73 changes: 39 additions & 34 deletions packages/react/select/src/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -638,40 +638,45 @@ export const RequiredWithinForm = () => {
};

export const WithinDialog = () => (
<Dialog.Root>
<Dialog.Trigger>Open Dialog</Dialog.Trigger>
<Dialog.Content aria-describedby={undefined}>
<Dialog.Title>A select in a dialog</Dialog.Title>
<Label>
Choose a number:
<Select.Root defaultValue="2">
<Select.Trigger className={triggerClass()}>
<Select.Value />
<Select.Icon />
</Select.Trigger>
<Select.Portal>
<Select.Content className={contentClass()}>
<Select.ScrollUpButton className={scrollUpButtonClass()}></Select.ScrollUpButton>
<Select.Viewport className={viewportClass()}>
{Array.from({ length: 30 }, (_, i) => (
<Select.Item key={i} className={itemClass()} value={String(i)}>
<Select.ItemText>Item {i}</Select.ItemText>
<Select.ItemIndicator className={indicatorClass()}>
<TickIcon />
</Select.ItemIndicator>
</Select.Item>
))}
</Select.Viewport>
<Select.ScrollDownButton className={scrollDownButtonClass()}>
</Select.ScrollDownButton>
</Select.Content>
</Select.Portal>
</Select.Root>
</Label>
<Dialog.Close>Close Dialog</Dialog.Close>
</Dialog.Content>
</Dialog.Root>
<div style={{ height: '120vh' }}>
<Dialog.Root>
<Dialog.Trigger>Open Dialog</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay />
<Dialog.Content aria-describedby={undefined} style={{ position: 'fixed', top: 100 }}>
<Dialog.Title>A select in a dialog</Dialog.Title>
<Label>
Choose a number:
<Select.Root defaultValue="2">
<Select.Trigger className={triggerClass()}>
<Select.Value />
<Select.Icon />
</Select.Trigger>
<Select.Portal>
<Select.Content className={contentClass()}>
<Select.ScrollUpButton className={scrollUpButtonClass()}></Select.ScrollUpButton>
<Select.Viewport className={viewportClass()}>
{Array.from({ length: 30 }, (_, i) => (
<Select.Item key={i} className={itemClass()} value={String(i)}>
<Select.ItemText>Item {i}</Select.ItemText>
<Select.ItemIndicator className={indicatorClass()}>
<TickIcon />
</Select.ItemIndicator>
</Select.Item>
))}
</Select.Viewport>
<Select.ScrollDownButton className={scrollDownButtonClass()}>
</Select.ScrollDownButton>
</Select.Content>
</Select.Portal>
</Select.Root>
</Label>
<Dialog.Close>Close Dialog</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
</div>
);

export const ChromaticShortOptionsPaddedContent = () => (
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17076,8 +17076,8 @@ __metadata:
linkType: hard

"react-remove-scroll-bar@npm:^2.3.3, react-remove-scroll-bar@npm:^2.3.4":
version: 2.3.5
resolution: "react-remove-scroll-bar@npm:2.3.5"
version: 2.3.6
resolution: "react-remove-scroll-bar@npm:2.3.6"
dependencies:
react-style-singleton: "npm:^2.2.1"
tslib: "npm:^2.0.0"
Expand All @@ -17087,7 +17087,7 @@ __metadata:
peerDependenciesMeta:
"@types/react":
optional: true
checksum: 10/6d05e74ee8049b322ba0aeb398e092ae284a5b04013bc07f0c1f283824b088fd5c1b1f1514a0e0e501c063a9c3b5899373039329d0266a21121222c814052053
checksum: 10/5ab8eda61d5b10825447d11e9c824486c929351a471457c22452caa19b6898e18c3af6a46c3fa68010c713baed1eb9956106d068b4a1058bdcf97a1a9bbed734
languageName: node
linkType: hard

Expand Down

0 comments on commit d312472

Please sign in to comment.