Skip to content

Commit

Permalink
revert: "feat: Add flexible layout for attribute editor (#3123)" (#3211)
Browse files Browse the repository at this point in the history
  • Loading branch information
gethinwebster authored Jan 22, 2025
1 parent 0830379 commit 372abbd
Show file tree
Hide file tree
Showing 25 changed files with 199 additions and 1,198 deletions.
156 changes: 0 additions & 156 deletions pages/attribute-editor/buttons.page.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions pages/attribute-editor/form-field-label.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Tag {

interface ControlProps extends InputProps {
index: number;
setItems: React.Dispatch<React.SetStateAction<Tag[]>>;
setItems?: any;
prop: keyof Tag;
}

Expand All @@ -29,7 +29,7 @@ const Control = React.memo(({ value, index, setItems, prop }: ControlProps) => {
ariaLabel="Secondary owner username"
ariaLabelledby=""
onChange={({ detail }) => {
setItems(items => {
setItems((items: any) => {
const updatedItems = [...items];
updatedItems[index] = { ...updatedItems[index], [prop]: detail.value };
return updatedItems;
Expand Down
19 changes: 0 additions & 19 deletions pages/attribute-editor/permutations.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,6 @@ export const permutations = createPermutations<AttributeEditorProps<Item>>([
addButtonText: ['Add item'],
removeButtonText: ['Remove item'],
},
{
definition: [definition4],
gridLayout: [
[
{ rows: [[2, 1, 3, 1]], breakpoint: 'l' },
{
rows: [
[2, 1],
[3, 1],
],
},
],
[{ rows: [[2, 1, 3, 1]], removeButton: { width: 'auto' } }],
[{ rows: [[2, 1, 3, 1]], removeButton: { ownRow: true } }],
],
items: [defaultItems],
addButtonText: ['Add item (grid)'],
removeButtonText: ['Remove item (grid)'],
},
{
definition: [validationDefinitions],
i18nStrings: [{ errorIconAriaLabel: 'Error', warningIconAriaLabel: 'Warning' }],
Expand Down
176 changes: 0 additions & 176 deletions pages/attribute-editor/simple-grid.page.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions pages/attribute-editor/simple.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Tag {

interface ControlProps extends InputProps {
index: number;
setItems: React.Dispatch<React.SetStateAction<Tag[]>>;
setItems?: any;
prop: keyof Tag;
}

Expand All @@ -30,7 +30,7 @@ const Control = React.memo(({ value, index, setItems, prop }: ControlProps) => {
<Input
value={value}
onChange={({ detail }) => {
setItems(items => {
setItems((items: any) => {
const updatedItems = [...items];
updatedItems[index] = { ...updatedItems[index], [prop]: detail.value };
return updatedItems;
Expand Down
Loading

0 comments on commit 372abbd

Please sign in to comment.