Skip to main content

📋 Parameters

Sherlo Parameters

Each story can have a set of parameters that customize the test setup.

ParameterTypeDefaultDescription
platform<Platform.OS>undefinedTest the story only on a specific platform
exclude<boolean>falseSkip the story during testing
Button.stories.jsx
export default {
component: Button,
parameters: {
sherlo: {
platform: "android", // Specify the testing platform
exclude: false // Set to true to exclude the story from testing
},
},
};

Platform

Setting platform parameter to either "android" or "ios" tests the story only on that specific platform.

Exclude

Setting exclude to true skips the story during testing.

This might be useful if the story has animations that cannot be stabilized for testing or the component behaves in less predictable ways.

Figma

You can integrate Figma with Sherlo to display the designs during the review, making it easy to detect any differences.

To do this, add the design parameter object, with the Figma URL, and the type set to "figma".

Button.stories.jsx
export default {
component: Button,
parameters: {
design: {
type: "figma",
url: "" // Paste the Figma URL
},
},
};