-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CreateConnectorButton component moved to it's own file
- Loading branch information
Showing
2 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
frontend/src/components/Connect/List/CreateConnectorButton.tsx
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,27 @@ | ||
import React from 'react'; | ||
import { clusterConnectorNewRelativePath } from 'lib/paths'; | ||
import { ActionButton } from 'components/common/ActionComponent'; | ||
import { Action, ResourceType } from 'generated-sources'; | ||
|
||
interface CreateConnectorButtonProps { | ||
disabled?: boolean; | ||
} | ||
|
||
const CreateConnectorButton: React.FC<CreateConnectorButtonProps> = ({ | ||
disabled = false, | ||
}) => ( | ||
<ActionButton | ||
buttonType="primary" | ||
buttonSize="M" | ||
disabled={disabled} | ||
to={clusterConnectorNewRelativePath} | ||
permission={{ | ||
resource: ResourceType.CONNECT, | ||
action: Action.CREATE, | ||
}} | ||
> | ||
Create Connector | ||
</ActionButton> | ||
); | ||
|
||
export default CreateConnectorButton; |
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