Skip to content

Commit

Permalink
Merge pull request #2552 from epam/hotfix/data-picker-row-defaults
Browse files Browse the repository at this point in the history
Returned defaults for DataPickerRow
  • Loading branch information
AlekseyManetov authored Oct 15, 2024
2 parents 5552b28 + 81dbc1e commit c1b8d0a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
6 changes: 4 additions & 2 deletions uui/components/pickers/DataPickerRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from 'react';
import { DataRowProps, Overwrite } from '@epam/uui-core';
import { DataPickerRow as UUIDataPickerRow } from '@epam/uui-components';
import { DataPickerCell } from './DataPickerCell';
import { PickerCellMods } from './types';
import { settings } from '../../settings';
import css from './DataPickerRow.module.scss';

export interface DataPickerRowModsOverride {
Expand All @@ -22,8 +24,8 @@ export class DataPickerRow<TItem, TId> extends React.Component<DataPickerRowProp
return (
<DataPickerCell
key="name"
size={ this.props.size }
padding={ this.props.padding }
size={ this.props.size || (settings.sizes.pickerInput.body.dropdown.row.default as PickerCellMods['size']) }
padding={ this.props.padding || (settings.sizes.pickerInput.body.dropdown.row.cell.padding as PickerCellMods['padding']) }
rowProps={ this.props }
alignActions={ this.props.alignActions || 'top' }
renderItem={ this.props.renderItem }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -162,6 +163,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -203,6 +205,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -244,6 +247,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -285,6 +289,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -326,6 +331,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -367,6 +373,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -408,6 +415,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -449,6 +457,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -490,6 +499,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -531,6 +541,7 @@ Array [
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -677,6 +688,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -716,6 +728,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -755,6 +768,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -794,6 +808,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -833,6 +848,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -872,6 +888,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -911,6 +928,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -950,6 +968,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -989,6 +1008,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -1028,6 +1048,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down Expand Up @@ -1067,6 +1088,7 @@ exports[`DataPickerBody should be rendered with minimum props 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`DataPickerRow should be rendered correctly 1`] = `
role="cell"
style={
Object {
"--uui-data_picker_cell-horizontal-padding": "24px",
"alignSelf": undefined,
"flexBasis": "0",
"flexGrow": 1,
Expand Down
1 change: 1 addition & 0 deletions uui/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const settings: Settings = {
row: {
default: '36',
cell: {
padding: '24',
text: {
24: '24',
30: '30',
Expand Down
1 change: 1 addition & 0 deletions uui/settings.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface PickerInputBodyCellSizes {
isBoldSelectionIcon: IsBoldSizes;
text: Sizes;
icon: Sizes;
padding: string;
}

interface PickerInputBodyRowSizes {
Expand Down

0 comments on commit c1b8d0a

Please sign in to comment.