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

fix(dropdown): children type #1300

Merged
merged 1 commit into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 79 additions & 99 deletions src/card/__tests__/__snapshots__/card.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -476,33 +476,29 @@ exports[`footer-actions.jsx 1`] = `
class="t-col"
style="flex-basis: auto;"
>
<span
class="t-trigger"
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
>
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
<span
class="t-button__text"
>
<span
class="t-button__text"
<svg
class="t-icon t-icon-more"
fill="none"
height="1em"
style="font-size: 24px;"
viewBox="0 0 16 16"
width="1em"
>
<svg
class="t-icon t-icon-more"
fill="none"
height="1em"
style="font-size: 24px;"
viewBox="0 0 16 16"
width="1em"
>
<path
d="M8 4a1 1 0 100-2 1 1 0 000 2zM8 9a1 1 0 100-2 1 1 0 000 2zM9 13a1 1 0 11-2 0 1 1 0 012 0z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</span>
</button>
</span>
<path
d="M8 4a1 1 0 100-2 1 1 0 000 2zM8 9a1 1 0 100-2 1 1 0 000 2zM9 13a1 1 0 11-2 0 1 1 0 012 0z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -567,33 +563,29 @@ exports[`footer-actions.jsx 1`] = `
class="t-col"
style="flex-basis: auto;"
>
<span
class="t-trigger"
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
>
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
<span
class="t-button__text"
>
<span
class="t-button__text"
<svg
class="t-icon t-icon-more"
fill="none"
height="1em"
style="font-size: 24px;"
viewBox="0 0 16 16"
width="1em"
>
<svg
class="t-icon t-icon-more"
fill="none"
height="1em"
style="font-size: 24px;"
viewBox="0 0 16 16"
width="1em"
>
<path
d="M8 4a1 1 0 100-2 1 1 0 000 2zM8 9a1 1 0 100-2 1 1 0 000 2zM9 13a1 1 0 11-2 0 1 1 0 012 0z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</span>
</button>
</span>
<path
d="M8 4a1 1 0 100-2 1 1 0 000 2zM8 9a1 1 0 100-2 1 1 0 000 2zM9 13a1 1 0 11-2 0 1 1 0 012 0z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -723,26 +715,22 @@ exports[`footer-content-actions.jsx 1`] = `
<div
class="t-card__actions"
>
<span
class="t-trigger"
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
>
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
<span
class="t-button__text"
>
<span
class="t-button__text"
<svg
class="t-icon t-icon-more"
>
<svg
class="t-icon t-icon-more"
>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</span>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -953,26 +941,22 @@ exports[`header-footer-actions.jsx 1`] = `
<div
class="t-card__actions"
>
<span
class="t-trigger"
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
>
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
<span
class="t-button__text"
>
<span
class="t-button__text"
<svg
class="t-icon t-icon-more"
>
<svg
class="t-icon t-icon-more"
>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</span>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</div>
</div>
<div
Expand Down Expand Up @@ -1161,26 +1145,22 @@ exports[`header-subtitle-footer-actions.jsx 1`] = `
<div
class="t-card__actions"
>
<span
class="t-trigger"
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
>
<button
class="t-button t-button--theme-default t-button--variant-text t-button--shape-square"
type="button"
<span
class="t-button__text"
>
<span
class="t-button__text"
<svg
class="t-icon t-icon-more"
>
<svg
class="t-icon t-icon-more"
>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</span>
<use
xlink:href="#t-icon-more"
/>
</svg>
</span>
</button>
</div>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Dropdown = (props: DropdownProps) => {
onVisibleChange={handleVisibleChange}
{...popupParams}
>
{arrayChildren}
{arrayChildren?.[0]}
</Popup>
);
};
Expand Down
Loading