DouyinFE / semi-design

🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻‍💻 Design to Code in one click
https://semi.design
Other
8.34k stars 703 forks source link

[BUG] <title> #1167

Closed NicholasJupiter closed 1 year ago

NicholasJupiter commented 1 year ago

Is there an existing issue for this?

Which Component

ButtonGroup

Semi Version

^2.19.0

Current Behavior

image image

Expected Behavior

No response

Steps To Reproduce

No response

ReproducibleCode

<ButtonGroup>
              <Button
                type={accountConfig[account]?.open ? 'primary' : 'danger'}
                icon={accountConfig[account]?.open ? <IconPause /> : <IconPlay />}
                onClick={
                  () => setAccountConfig((config) => {
                    config[account].open = !config[account].open;
                    return { ...config };
                  })
                }
                key="play"
              >
                {accountConfig[account]?.open ? '开始中' : '已暂停'}
              </Button>
              <Button icon={<IconRefresh />} />
              <Button icon={<IconMore />} />
            </ButtonGroup>

Environment

- OS:
- browser:
- node: 16.14.2
- npm: 8.19.2
- react: 18.2

Anything else?

No response

NicholasJupiter commented 1 year ago
const renderCol = () => accounts.map((account) => (
    <Col lg={12} span={24} key={account}>
      <Card>
        <div className="flex items-center py-2">
          <div className="account-name">
            <Typography.Text
              link={{
                href: `https://wax.bloks.io/account/${account}`,
                target: '_blank',
              }}
              copyable
            >
              {account}
            </Typography.Text>
          </div>
          <div className="ml-auto">
            <ButtonGroup>
              <Button
                type={accountConfig[account]?.open ? 'primary' : 'danger'}
                icon={accountConfig[account]?.open ? <IconPause /> : <IconPlay />}
                onClick={
                  () => setAccountConfig((config) => {
                    config[account].open = !config[account].open;
                    return { ...config };
                  })
                }
                key="play"
              >
                {accountConfig[account]?.open ? '开始中' : '已暂停'}
              </Button>
              <Button icon={<IconRefresh />} />
              <Button icon={<IconMore />} />
            </ButtonGroup>
          </div>
        </div>
        <TableBalance fetchBalances={fetchBalances} account={account} />
        <Tools account={account} />
      </Card>
    </Col>
  ));
pointhalo commented 1 year ago

image

please update version of semi-ui