Skip to content

Commit

Permalink
fix(opacitycheckerboard): only apply inline-size properties to storyb…
Browse files Browse the repository at this point in the history
…ook for opacitycheckerboard
  • Loading branch information
jenndiaz committed Jan 22, 2024
1 parent a595f9d commit 25e844a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
},
args: {
rootClass: "spectrum-OpacityCheckerboard",
backgroundPosition: "top left"
backgroundPosition: "left top"
},
parameters: {
actions: {
Expand All @@ -39,11 +39,20 @@ export default {
],
};
export const Default = Template.bind({});
Default.args = {};
Default.args = {
customStyles: {
"inline-size": "100%",
"block-size": "100%"
}
};

export const CheckerboardPosition = Template.bind({});
CheckerboardPosition.args = {
backgroundPosition: 'center center',
customStyles: {
"inline-size": "100%",
"block-size": "100%"
}
};
CheckerboardPosition.parameters = {
docs: {
Expand Down
4 changes: 1 addition & 3 deletions components/opacitycheckerboard/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "../index.css";

export const Template = ({
rootClass = "spectrum-OpacityCheckerboard",
backgroundPosition = "top left",
backgroundPosition,
customClasses = [],
customStyles = {},
id,
Expand All @@ -22,8 +22,6 @@ export const Template = ({
})}
style=${ifDefined(styleMap({
"--mod-opacity-checkerboard-position": backgroundPosition,
"inline-size": "100%",
"block-size": "100%",
...customStyles,
}))}
role=${ifDefined(role)}
Expand Down

0 comments on commit 25e844a

Please sign in to comment.