-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: add SelectBoxGroup to chromatic #8760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
packages/@react-spectrum/s2/chromatic/SelectBoxGroup.stories.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| /* | ||
| * Copyright 2025 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| import {action} from '@storybook/addon-actions'; | ||
| import type {Meta, StoryObj} from '@storybook/react'; | ||
| import PaperAirplane from '../spectrum-illustrations/linear/Paperairplane'; | ||
| import React from 'react'; | ||
| import {SelectBox, SelectBoxGroup, Text} from '../src'; | ||
| import Server from '../spectrum-illustrations/linear/Server'; | ||
|
|
||
| const meta: Meta<typeof SelectBoxGroup> = { | ||
| component: SelectBoxGroup, | ||
| parameters: { | ||
| chromaticProvider: {disableAnimations: true} | ||
| }, | ||
| title: 'S2 Chromatic/SelectBoxGroup' | ||
| }; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof SelectBoxGroup>; | ||
|
|
||
| export const VerticalOrientation: Story = { | ||
| render: () => ( | ||
| <div style={{width: 600}}> | ||
| <SelectBoxGroup | ||
| orientation="vertical" | ||
| onSelectionChange={action('onSelectionChange')}> | ||
| <SelectBox value="text-only"> | ||
| <Text slot="label">V: Text Only</Text> | ||
| </SelectBox> | ||
| <SelectBox value="illustration-text"> | ||
| <Server /> | ||
| <Text slot="label">V: Illustration + Text</Text> | ||
| </SelectBox> | ||
| <SelectBox value="illustration-desc"> | ||
| <PaperAirplane /> | ||
| </SelectBox> | ||
| </SelectBoxGroup> | ||
| </div> | ||
| ) | ||
| }; | ||
|
|
||
| export const HorizontalOrientation: Story = { | ||
| render: () => ( | ||
| <div style={{width: 800}}> | ||
| <SelectBoxGroup | ||
| orientation="horizontal" | ||
| onSelectionChange={action('onSelectionChange')}> | ||
| <SelectBox value="text-only"> | ||
| <Text slot="label">Title Only</Text> | ||
| </SelectBox> | ||
| <SelectBox value="illustration-text"> | ||
| <Server /> | ||
| <Text slot="label">Illustration + Title</Text> | ||
| </SelectBox> | ||
| <SelectBox value="text-desc"> | ||
| <Text slot="label">Title + Description</Text> | ||
| <Text slot="description">Additional description</Text> | ||
| </SelectBox> | ||
| <SelectBox value="h-all"> | ||
| <Server /> | ||
| <Text slot="label">Illustration + Title + Description</Text> | ||
| <Text slot="description">Full horizontal layout with all elements</Text> | ||
| </SelectBox> | ||
| </SelectBoxGroup> | ||
| </div> | ||
| ) | ||
| }; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,14 @@ | ||
| /************************************************************************* | ||
| * ADOBE CONFIDENTIAL | ||
| * ___________________ | ||
| /* | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just changed this to match how our files do it |
||
| * Copyright 2025 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Copyright 2025 Adobe | ||
| * All Rights Reserved. | ||
| * | ||
| * NOTICE: All information contained herein is, and remains | ||
| * the property of Adobe and its suppliers, if any. The intellectual | ||
| * and technical concepts contained herein are proprietary to Adobe | ||
| * and its suppliers and are protected by all applicable intellectual | ||
| * property laws, including trade secret and copyright laws. | ||
| * Dissemination of this information or reproduction of this material | ||
| * is strictly forbidden unless prior written permission is obtained | ||
| * from Adobe. | ||
| **************************************************************************/ | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| import {action} from '@storybook/addon-actions'; | ||
| import AlertNotice from '../spectrum-illustrations/linear/AlertNotice'; | ||
|
|
@@ -312,5 +307,6 @@ export const AllSlotCombinations: Story = { | |
| </div> | ||
|
|
||
| </div> | ||
| ) | ||
| ), | ||
| tags: ['!autodocs'] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could either remove this and rely on chromatic or leave this in storybook and remove it from the docs |
||
| }; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed that the checkbox was showing up on the wrong side when i added it to chromatic