Skip to content

Commit

Permalink
chore(colorwheel): add color loupe to default story
Browse files Browse the repository at this point in the history
  • Loading branch information
cdransf committed Jan 31, 2025
1 parent c8b03d9 commit ec856d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/colorwheel/stories/colorwheel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ export default {
},
control: "boolean",
},
isWithColorLoupe: {
name: "With color loupe",
type: { name: "boolean" },
table: {
type: { summary: "boolean" },
category: "State",
},
control: "boolean",
},
selectedColor: {
name: "Selected color",
description: "The color of the handle.",
Expand All @@ -57,7 +66,9 @@ export default {
};

export const Default = ColorWheelGroup.bind({});
Default.args = {};
Default.args = {
isWithColorLoupe: true,
};

// ********* DOCS ONLY ********* //
export const Disabled = Template.bind({});
Expand Down
2 changes: 2 additions & 0 deletions components/colorwheel/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const Template = ({
isDisabled = false,
isFocused = false,
isWithColorArea = false,
isWithColorLoupe = true,
colorHandleStyle = {},
selectedColor = "rgba(255, 0, 0, 50%)",
} = {}, context = {}) => {
Expand Down Expand Up @@ -46,6 +47,7 @@ export const Template = ({
customClasses: [`${rootClass}-handle`],
selectedColor,
customStyles: colorHandleStyle,
isWithColorLoupe,
}, context)}
<input type="range" class="${rootClass}-slider" aria-label="hue" min="0" max="360" step="">
</div>
Expand Down

0 comments on commit ec856d2

Please sign in to comment.