Skip to content

Commit

Permalink
Merge pull request #1300 from Tencent/fix/dropdown-style
Browse files Browse the repository at this point in the history
fix(dropdown): children type
  • Loading branch information
honkinglin authored Aug 16, 2022
2 parents 4a2de34 + fe6ab27 commit 839a2f2
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 271 deletions.
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

0 comments on commit 839a2f2

Please sign in to comment.