Skip to content

Commit

Permalink
perf-app: Added performance test scenario for the ColorPicker (#33496)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaKozlova authored Dec 20, 2024
1 parent df9a753 commit fc5f0b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/perf-test-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@fluentui/scripts-perf-test-flamegrill": "*",
"@fluentui/react-avatar": "*",
"@fluentui/react-button": "*",
"@fluentui/react-color-picker-preview": "*",
"@fluentui/react-components": "*",
"@fluentui/react-field": "*",
"@fluentui/react-persona": "*",
Expand Down
18 changes: 18 additions & 0 deletions apps/perf-test-react-components/src/scenarios/ColorPicker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from 'react';
import { ColorPicker, ColorArea, ColorSlider, AlphaSlider } from '@fluentui/react-color-picker-preview';
import { FluentProvider } from '@fluentui/react-provider';
import { webLightTheme } from '@fluentui/react-theme';

const Scenario = () => (
<ColorPicker color={{ h: 109, s: 1, v: 0.91 }}>
<ColorArea />
<ColorSlider />
<AlphaSlider />
</ColorPicker>
);

Scenario.decorator = (props: { children: React.ReactNode }) => (
<FluentProvider theme={webLightTheme}>{props.children}</FluentProvider>
);

export default Scenario;

0 comments on commit fc5f0b1

Please sign in to comment.