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

feat(Disclosure): use logical properties #1140

Merged
merged 6 commits into from
Nov 20, 2023
Merged

feat(Disclosure): use logical properties #1140

merged 6 commits into from
Nov 20, 2023

Conversation

Raubzeug
Copy link
Contributor

No description provided.

@Raubzeug Raubzeug requested a review from amje November 17, 2023 15:37
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@amje amje changed the title feat(Disclosure): use logical properties feat(Disclosure)!: use logical properties Nov 17, 2023
@amje amje changed the title feat(Disclosure)!: use logical properties feat(Disclosure): use logical properties Nov 17, 2023
src/components/Disclosure/Disclosure.tsx Outdated Show resolved Hide resolved
@@ -11,7 +11,7 @@ Disclosure component that shows and hides enclosed content.
| disabled | `Boolean` | | `false` | Disabled state |
| defaultExpanded | `Boolean` | | `false` | Default opening state |
| expanded | `Boolean` | | | Controlled opening state |
| arrowPosition | `left` `right` | | `left` | Control position |
| arrowPosition | `left` `right` `start` `end` | | `start` | Control position |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We suppose left and right are being deprecated, so they don’t need to be documented

@@ -38,11 +38,19 @@ export function DefaultDisclosureSummary({
disabled,
}: DisclosureSummaryRenderFunctionProps) {
const {size, summary, arrowPosition} = useDisclosureAttributes();
let sideMod = arrowPosition;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t it arrowMod?

@@ -11,7 +11,7 @@ import {b} from './cn';
import './Disclosure.scss';

export type DisclosureSize = 'm' | 'l' | 'xl';
export type DisclosureArrowPosition = 'left' | 'right' | 'start' | 'end';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would break typings for those who passes this type to the props. Let's keep them here. I will add warning later, for all such types

@Raubzeug Raubzeug merged commit a4b1041 into next Nov 20, 2023
3 checks passed
@Raubzeug Raubzeug deleted the disclosure-rtl branch November 20, 2023 11:39
@Raubzeug Raubzeug mentioned this pull request Nov 21, 2023
44 tasks
amje pushed a commit that referenced this pull request Dec 6, 2023
amje pushed a commit that referenced this pull request Feb 1, 2024
amje pushed a commit that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants