Skip to content

Commit

Permalink
chore(dropindicator): update storybook prop to use length instead of …
Browse files Browse the repository at this point in the history
…size (#3025)
  • Loading branch information
castastrophe authored Sep 19, 2024
1 parent 24f0734 commit 1830942
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions components/dropindicator/stories/dropindicator.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
options: ["horizontal", "vertical"],
control: "select",
},
size: {
length: {
name: "Size",
description:
"Size of the drop indicator, requires a unit be provided; i.e., 200px or 100%.",
Expand All @@ -35,7 +35,7 @@ export default {
args: {
rootClass: "spectrum-DropIndicator",
direction: "vertical",
size: "300px",
length: "300px",
},
parameters: {
packageJson: pkgJson,
Expand All @@ -50,7 +50,7 @@ Default.tags = ["!autodocs"];
export const DefaultGroup = DocsDropIndicatorGroup.bind({});
DefaultGroup.storyName = "Default";
DefaultGroup.tags = ["!dev"];
DefaultGroup.parameters = {
DefaultGroup.parameters = {
chromatic: { disableSnapshot: true }
};

Expand Down
10 changes: 4 additions & 6 deletions components/dropindicator/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Template = ({
customClasses = [],
customStyles = {},
direction = "vertical",
size = "300px",
length = "300px",
} = {}) => {
return html`
<div
Expand All @@ -20,8 +20,8 @@ export const Template = ({
...customClasses.reduce((a, c) => ({ ...a, [c]: true }), {}),
})}
style=${ifDefined(styleMap({
"block-size": direction == "vertical" ? size : undefined,
"inline-size": direction == "horizontal" ? size : undefined,
"block-size": direction == "vertical" ? length : undefined,
"inline-size": direction == "horizontal" ? length : undefined,
...customStyles,
}))}
></div>
Expand All @@ -35,9 +35,7 @@ export const DocsDropIndicatorGroup = (args, context) => html`
"gap": "16px",
"justify-content": "space-evenly",
})}>
${Template({
...args,
}, context)}
${Template(args, context)}
${Template({
...args,
direction: "horizontal",
Expand Down

0 comments on commit 1830942

Please sign in to comment.