Skip to content

Commit

Permalink
created the headerAlign prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriaMaltseva committed Dec 10, 2024
1 parent 6cb5eee commit 0a7caa2
Show file tree
Hide file tree
Showing 36 changed files with 1,945 additions and 6,324 deletions.
6 changes: 4 additions & 2 deletions assets/js/src/core/components/accordion/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

import React, { useEffect, useState } from 'react'
import { Collapse, type CollapseProps, Flex } from 'antd'
import { Collapse, type CollapseProps, Flex, type FlexProps } from 'antd'
import cn from 'classnames'
import { useStyles } from '@Pimcore/components/accordion/accordion.styles'
import { type ItemType } from 'rc-collapse/es/interface'
Expand All @@ -37,13 +37,15 @@ export interface AccordionProps extends Omit<CollapseProps, 'expandIconPosition'
spaced?: boolean
bordered?: boolean
expandIconPosition?: CustomExpandIconPosition
headerAlign?: FlexProps['align']
}

export const Accordion = ({
items,
accordion = false,
spaced = false,
bordered = false,
headerAlign = 'baseline',
className,
activeKey,
expandIconPosition = 'after-title',
Expand Down Expand Up @@ -114,7 +116,7 @@ export const Accordion = ({
className: itemClassNames,
label: <>
<Flex
align={ 'baseline' }
align={ headerAlign }
>
{expandIconPosition === 'start' && (item.children !== null) && !(item.disabled === true) &&
chevronButton()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export const NotesAndEventsTabView = ({
>
<Accordion
accordion={ false }
headerAlign={ 'center' }
items={ NotesAndEvents }
spaced
/>
Expand Down
14 changes: 14 additions & 0 deletions public/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/entrypoints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entrypoints": {
"main": {
"css": [
"http://localhost:3030/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-41eabe.css",
"http://localhost:3030/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/main.css"
],
"js": [
"http://localhost:3030/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-41eabe.js",
"http://localhost:3030/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/main.js"
]
}
}
}
1,926 changes: 1,926 additions & 0 deletions public/build/0505ea21-bf9b-42be-91b2-1e605020f2ae/manifest.json

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions public/build/3b1f3e88-2e0d-4b8c-b55a-1852ff9ada37/core-dll.js

This file was deleted.

12 changes: 0 additions & 12 deletions public/build/3b1f3e88-2e0d-4b8c-b55a-1852ff9ada37/entrypoints.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions public/build/65ed0e96-b0cb-49f1-b16f-3e333f8fefee/main.js

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions public/build/8958afbf-8b2d-4136-a081-5eb5eb2fad53/entrypoints.json

This file was deleted.

Loading

0 comments on commit 0a7caa2

Please sign in to comment.