-
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.
improve(ui): Action.Link gap 8px => 16px
- Loading branch information
1 parent
d1e687e
commit bec040e
Showing
8 changed files
with
74 additions
and
54 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
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,17 +1,39 @@ | ||
import React, { useState } from 'react'; | ||
import { Action } from '@oceanbase/ui'; | ||
import { Form, Switch } from '@oceanbase/design'; | ||
|
||
export default () => { | ||
const [visible, setVisible] = useState(true); | ||
const [disabled, setDisabled] = useState(false); | ||
return ( | ||
<Action.Group | ||
shouldDisabled={key => key === 'action2'} | ||
shouldVisible={key => key !== 'action1'} | ||
> | ||
<Action.Link key="action1">action1</Action.Link> | ||
<Action.Link key="action2">action2</Action.Link> | ||
<Action.Link key="action3">action3</Action.Link> | ||
<Action.Link key="action4">action4</Action.Link> | ||
<Action.Link key="action5">action5</Action.Link> | ||
</Action.Group> | ||
<> | ||
<Form layout="inline" style={{ marginBottom: 16 }}> | ||
<Form.Item label="visible" required={true}> | ||
<Switch | ||
size="small" | ||
value={visible} | ||
onChange={value => { | ||
setVisible(value); | ||
}} | ||
/> | ||
</Form.Item> | ||
<Form.Item label="disabled" required={true}> | ||
<Switch | ||
size="small" | ||
value={disabled} | ||
onChange={value => { | ||
setDisabled(value); | ||
}} | ||
/> | ||
</Form.Item> | ||
</Form> | ||
<Action.Group shouldVisible={key => visible} shouldDisabled={key => disabled}> | ||
<Action.Link key="action1">action1</Action.Link> | ||
<Action.Link key="action2">action2</Action.Link> | ||
<Action.Link key="action3">action3</Action.Link> | ||
<Action.Link key="action4">action4</Action.Link> | ||
<Action.Link key="action5">action5</Action.Link> | ||
</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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Space } from '@oceanbase/design'; | ||
import { Action } from '@oceanbase/ui'; | ||
import { DownOutlined } from '@oceanbase/icons'; | ||
|
||
export default () => { | ||
return ( | ||
<Action.Group | ||
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
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