Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Slug): updates Slug styles to match new floating-ui selectors #16039

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Expand Up @@ -10692,23 +10692,23 @@ Map {
Array [
"top",
"top-left",
"top-start",
"top-right",
"top-end",
"bottom",
"bottom-left",
"bottom-start",
"bottom-right",
"bottom-end",
"left",
"left-bottom",
"left-end",
"left-top",
"left-start",
"right",
"right-bottom",
"right-top",
"top-start",
"top-end",
"bottom-start",
"bottom-end",
"left-end",
"left-start",
"right-end",
"right-top",
"right-start",
],
],
Expand Down
42 changes: 41 additions & 1 deletion packages/react/src/components/Slug/Slug.stories.js
Expand Up @@ -293,6 +293,26 @@ Callout.argTypes = {
},
description: 'Playground only - toggle to show the callout toolbar',
},
align: {
options: [
'top',
'top-start',
'top-end',

'bottom',
'bottom-start',
'bottom-end',

'left',
'left-end',
'left-start',

'right',
'right-end',
'right-start',
],
control: { type: 'select' },
},
revertActive: {
table: {
disable: true,
Expand Down Expand Up @@ -392,7 +412,7 @@ export const Playground = (args) => {
return (
<>
<div className="slug-container slug-container-example">
<Slug autoAlign {...args}>
<Slug {...args}>
<SlugContent>{renderedContent}</SlugContent>
</Slug>
</div>
Expand All @@ -409,4 +429,24 @@ Playground.argTypes = {
},
description: 'Playground only - toggle to show the callout toolbar',
},
align: {
options: [
'top',
'top-start',
'top-end',

'bottom',
'bottom-start',
'bottom-end',

'left',
'left-end',
'left-start',

'right',
'right-end',
'right-start',
],
control: { type: 'select' },
},
};
16 changes: 7 additions & 9 deletions packages/react/src/components/Slug/index.js
Expand Up @@ -175,28 +175,26 @@ Slug.propTypes = {
align: PropTypes.oneOf([
'top',
'top-left', // deprecated use top-start instead
'top-start',
'top-right', // deprecated use top-end instead
'top-end',

'bottom',
'bottom-left', // deprecated use bottom-start instead
'bottom-start',
'bottom-right', // deprecated use bottom-end instead
'bottom-end',

'left',
'left-bottom', // deprecated use left-end instead
'left-end',
'left-top', // deprecated use left-start instead
'left-start',

'right',
'right-bottom', // deprecated use right-end instead
'right-top', // deprecated use right-start instead

// new values to match floating-ui
'top-start',
'top-end',
'bottom-start',
'bottom-end',
'left-end',
'left-start',
'right-end',
'right-top', // deprecated use right-start instead
'right-start',
]),

Expand Down