Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzz committed Dec 4, 2024
2 parents 54a6db8 + 5a0c990 commit 11c0376
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 13 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions packages/react-ui/components/TokenInput/TokenInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ export class TokenInput<T = string> extends React.PureComponent<TokenInputProps<
menuAlign={menuAlign}
renderTotalCount={renderTotalCount}
totalCount={totalCount}
size={this.getProps().size}
/>
)}
{this.renderTokensEnd()}
Expand Down
1 change: 1 addition & 0 deletions packages/react-ui/components/TokenInput/TokenInputMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class TokenInputMenu<T = string> extends React.Component<TokenInputMenuPr
withoutMobile
>
<ComboBoxMenu
size={this.props.size}
items={items}
loading={loading}
hasMargin={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,23 @@ kind('TokenInput', () => {
await this.expect(await this.takeScreenshot()).to.matchImage();
});
});

story('Size', ({ setStoryParameters }) => {
setStoryParameters({
captureElement: '[data-tid="Gapped__vertical"]',
});

test('MenuItem inherits size', async function () {
await this.browser.actions({ bridge: true }).keyDown(this.keys.TAB).perform();
const tab1 = await this.takeScreenshot();

await this.browser.actions({ bridge: true }).keyDown(this.keys.TAB).perform();
const tab2 = await this.takeScreenshot();

await this.browser.actions({ bridge: true }).keyDown(this.keys.TAB).perform();
const tab3 = await this.takeScreenshot();

await this.expect([tab1, tab2, tab3]).to.matchImages();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ CustomRenderTotalCount.storyName = 'custom render total count';

export const Size = () => {
return (
<Gapped vertical gap={10}>
<Gapped vertical gap={10} style={{ padding: '10px 10px 120px' }}>
<Wrapper numberItems={5} getItems={getItems} size="small" />
<Wrapper numberItems={5} getItems={getItems} size="medium" />
<Wrapper numberItems={5} getItems={getItems} size="large" />
Expand Down

0 comments on commit 11c0376

Please sign in to comment.