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(FormRow): add direction prop #104

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

mournfulCoroner
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

display: flex;
margin-bottom: 20px;

&_direction_row {
Copy link
Contributor

Choose a reason for hiding this comment

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

put modifiers inside element selectors pls

&__left {
  #{$block}_direction_row & {}
  #{$block}_direction_column & {}
}

@@ -13,6 +13,8 @@ export interface FormRowProps {
/** Field component itself. `<FormRow.FieldDescription/>` could be used here
* next to field component itself */
children?: ReactNode;
/** Direction in which the elements are placed */
direction?: 'row' | 'column';
Copy link
Contributor

Choose a reason for hiding this comment

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

Add alias ForRowDirection for this union and export it

@mournfulCoroner mournfulCoroner force-pushed the feat-column-mode-FormRow branch from 39f8499 to e3eaade Compare October 3, 2023 07:56
@mournfulCoroner mournfulCoroner force-pushed the feat-column-mode-FormRow branch from e3eaade to d48d3ff Compare October 3, 2023 07:57
}

#{$block}_direction_column & {
width: 100%;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this required with display: flex?

@mournfulCoroner mournfulCoroner merged commit 7b10308 into main Oct 4, 2023
3 checks passed
@mournfulCoroner mournfulCoroner deleted the feat-column-mode-FormRow branch October 4, 2023 07:25
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