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’ll 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 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion packages/react/src/components/Slug/Slug.stories.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading
Loading