-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
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
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
37 changes: 37 additions & 0 deletions
37
examples/expo-example/other_components/DeepControls/DeepControls.stories.tsx
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,37 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import React from 'react'; | ||
import { Text } from 'react-native'; | ||
|
||
const DeepControls = () => { | ||
return <Text>Testing story with deep controls (storybook-addon-deep-controls)</Text>; | ||
}; | ||
|
||
export default { | ||
title: 'DeepControls', | ||
component: DeepControls, | ||
} satisfies Meta<typeof DeepControls>; | ||
|
||
export const Basic: StoryObj<typeof DeepControls> = { | ||
parameters: { | ||
deepControls: { enabled: true }, | ||
}, | ||
args: { | ||
objectArg: { | ||
string: 'foo', | ||
number: 42, | ||
boolean: true, | ||
enumString: 'value2', // we only want specific values for this | ||
nested: { | ||
number: 222, | ||
boolean: false, | ||
}, | ||
}, | ||
}, | ||
argTypes: { | ||
// so we define an argType for the property to use a radio control with specific values | ||
'objectArg.enumString': { | ||
control: 'radio', | ||
options: ['value1', 'value2', 'value3'], | ||
}, | ||
}, | ||
}; |
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