-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #719 from oceanbase/dengfuping-dev
feat(ui): Action.Group add buttonSize prop and Action.Button add size prop
- Loading branch information
Showing
8 changed files
with
94 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,42 @@ | ||
import React, { useState } from 'react'; | ||
import { Form, Radio, Space } from '@oceanbase/design'; | ||
import { ButtonSize } from '@oceanbase/design/es/button'; | ||
import { Action } from '@oceanbase/ui'; | ||
import { DownOutlined } from '@oceanbase/icons'; | ||
|
||
export default () => { | ||
const [buttonSize, setButtonSize] = useState<ButtonSize>('middle'); | ||
return ( | ||
<Action.Group moreText={'更多操作'}> | ||
<Action.Button type="primary">action1</Action.Button> | ||
<Action.Button danger>危险按钮</Action.Button> | ||
<Action.Button>action3</Action.Button> | ||
<Action.Button>action4</Action.Button> | ||
<Action.Button>action5</Action.Button> | ||
</Action.Group> | ||
<> | ||
<Form layout="inline" requiredMark={false} style={{ marginBottom: 24 }}> | ||
<Form.Item label="buttonSize"> | ||
<Radio.Group | ||
value={buttonSize} | ||
onChange={e => { | ||
setButtonSize(e.target.value); | ||
}} | ||
> | ||
<Radio value="large">large</Radio> | ||
<Radio value="middle">middle</Radio> | ||
<Radio value="small">small</Radio> | ||
</Radio.Group> | ||
</Form.Item> | ||
</Form> | ||
<Action.Group | ||
buttonSize={buttonSize} | ||
moreText={ | ||
<Space size={4}> | ||
更多 | ||
<DownOutlined /> | ||
</Space> | ||
} | ||
> | ||
<Action.Button type="primary">action1</Action.Button> | ||
<Action.Button danger>危险按钮</Action.Button> | ||
<Action.Button>action3</Action.Button> | ||
<Action.Button>action4</Action.Button> | ||
<Action.Button>action5</Action.Button> | ||
</Action.Group> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import React, { useState } from 'react'; | ||
import { Action } from '@oceanbase/ui'; | ||
|
||
export default () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import React, { useState } from 'react'; | ||
import { Action } from '@oceanbase/ui'; | ||
|
||
export default () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters