-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(TextInput): Add dev stories and vrt tests (#5224)
* chore(TextInput): Add dev stories and vrt tests * update custom class * test(vrt): update snapshots --------- Co-authored-by: hussam-i-am <hussam-i-am@users.noreply.github.com>
- Loading branch information
1 parent
4e9d284
commit d09f57e
Showing
29 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+6.09 KB
...nts/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.1 KB
...ponents/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.04 KB
.../TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.09 KB
...ots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.09 KB
...nts/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.06 KB
...ts/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.06 KB
...TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.06 KB
...ts/components/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.06 KB
...ts/TextInput.test.ts-snapshots/TextInput-Dev-WithCSS-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...ents/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.12 KB
...mponents/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.98 KB
...s/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...hots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...ents/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...nts/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6 KB
.../TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...ots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...nts/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...extInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.12 KB
...ts/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.98 KB
...Input.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...omponents/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.08 KB
...extInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...xtInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6 KB
...nput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...mponents/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.03 KB
...xtInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-tritanopia-linux.png
Oops, something went wrong.
This file contains 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 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,55 @@ | ||
import React from 'react' | ||
import type {Meta} from '@storybook/react' | ||
import {Box, FormControl} from '..' | ||
import TextInput from '.' | ||
import {textInputExcludedControlKeys} from '../utils/story-helpers' | ||
import {FeatureFlags} from '../FeatureFlags' | ||
|
||
export default { | ||
title: 'Components/TextInput/Dev', | ||
component: TextInput, | ||
parameters: {controls: {exclude: textInputExcludedControlKeys}}, | ||
} as Meta<React.ComponentProps<typeof TextInput>> | ||
|
||
export const WithCSS = () => ( | ||
<FeatureFlags | ||
flags={{ | ||
primer_react_css_modules_team: true, | ||
primer_react_css_modules_staff: true, | ||
primer_react_css_modules_ga: true, | ||
}} | ||
> | ||
<Box as="form"> | ||
<FormControl> | ||
<FormControl.Label>Default label</FormControl.Label> | ||
<TextInput className="testCustomClassnameBorderColor" /> | ||
</FormControl> | ||
</Box> | ||
</FeatureFlags> | ||
) | ||
|
||
export const WithSx = () => ( | ||
<Box as="form"> | ||
<FormControl> | ||
<FormControl.Label>Default label</FormControl.Label> | ||
<TextInput sx={{borderColor: 'red'}} /> | ||
</FormControl> | ||
</Box> | ||
) | ||
|
||
export const WithSxAndCSS = () => ( | ||
<FeatureFlags | ||
flags={{ | ||
primer_react_css_modules_team: true, | ||
primer_react_css_modules_staff: true, | ||
primer_react_css_modules_ga: true, | ||
}} | ||
> | ||
<Box as="form"> | ||
<FormControl> | ||
<FormControl.Label>Default label</FormControl.Label> | ||
<TextInput sx={{borderColor: 'red'}} className="testCustomClassnameBorderColor" /> | ||
</FormControl> | ||
</Box> | ||
</FeatureFlags> | ||
) |