Skip to content

Commit

Permalink
aligning buttons with title
Browse files Browse the repository at this point in the history
Signed-off-by: R-Lawton <[email protected]>
  • Loading branch information
R-Lawton committed Oct 24, 2024
1 parent 68dbd9c commit 70e325d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 45 deletions.
86 changes: 43 additions & 43 deletions src/components/KuadrantOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,43 +348,41 @@ const KuadrantOverviewPage: React.FC = () => {
namespace="#ALL_NS#"
paginationLimit={5}
/>
<div className="kuadrant-overview-create-button pf-u-mt-md">
<Dropdown
isOpen={isCreateOpen}
onSelect={onMenuSelect}
onOpenChange={setIsCreateOpen}
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<MenuToggle
ref={toggleRef}
onClick={onToggleClick}
isExpanded={isCreateOpen}
variant="primary"
>
{t('Create Policy')}
</MenuToggle>
)}
>
<DropdownList>
<DropdownItem value="AuthPolicy" key="auth-policy">
{t('AuthPolicy')}
</DropdownItem>
<DropdownItem value="RateLimitPolicy" key="rate-limit-policy">
{t('RateLimitPolicy')}
</DropdownItem>
<DropdownItem value="DNSPolicy" key="dns-policy">
{t('DNSPolicy')}
</DropdownItem>
<DropdownItem value="TLSPolicy" key="tls-policy">
{t('TLSPolicy')}
</DropdownItem>
</DropdownList>
</Dropdown>
</div>
<Dropdown
isOpen={isCreateOpen}
onSelect={onMenuSelect}
onOpenChange={setIsCreateOpen}
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<MenuToggle
ref={toggleRef}
onClick={onToggleClick}
isExpanded={isCreateOpen}
variant="primary"
className="kuadrant-overview-create-button pf-u-mt-md pf-u-mr-md"
>
{t('Create Policy')}
</MenuToggle>
)}
>
<DropdownList class="kuadrant-overview-create-list pf-u-p-0">
<DropdownItem value="AuthPolicy" key="auth-policy">
{t('AuthPolicy')}
</DropdownItem>
<DropdownItem value="RateLimitPolicy" key="rate-limit-policy">
{t('RateLimitPolicy')}
</DropdownItem>
<DropdownItem value="DNSPolicy" key="dns-policy">
{t('DNSPolicy')}
</DropdownItem>
<DropdownItem value="TLSPolicy" key="tls-policy">
{t('TLSPolicy')}
</DropdownItem>
</DropdownList>
</Dropdown>
</CardBody>
</Card>
</FlexItem>
</Flex>

<Flex className="pf-u-mt-xl">
<FlexItem flex={{ default: 'flex_1' }}>
<Card>
Expand All @@ -398,11 +396,12 @@ const KuadrantOverviewPage: React.FC = () => {
namespace="#ALL_NS#"
emtpyResourceName="Gateways"
/>
<div className="kuadrant-overview-create-button pf-u-mt-md">
<Button onClick={() => handleCreateResource('Gateway')}>
{t(`Create Gateway`)}
</Button>
</div>
<Button
onClick={() => handleCreateResource('Gateway')}
className="kuadrant-overview-create-button pf-u-mt-md pf-u-mr-md"
>
{t(`Create Gateway`)}
</Button>
</CardBody>
</Card>
</FlexItem>
Expand All @@ -418,11 +417,12 @@ const KuadrantOverviewPage: React.FC = () => {
namespace="#ALL_NS#"
emtpyResourceName="HTTPRoutes"
/>
<div className="kuadrant-overview-create-button pf-u-mt-md">
<Button onClick={() => handleCreateResource('HTTPRoute')}>
{t(`Create HTTPRoute`)}
</Button>
</div>
<Button
onClick={() => handleCreateResource('HTTPRoute')}
className="kuadrant-overview-create-button pf-u-mt-md pf-u-mr-md"
>
{t(`Create HTTPRoute`)}
</Button>
</CardBody>
</Card>
</FlexItem>
Expand Down
8 changes: 6 additions & 2 deletions src/components/kuadrant.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@

.kuadrant-overview-create-button {
position: absolute;
top: 30px;
right: 30px;
top: 0;
right: 0;
}

.kuadrant-overview-create-list, .kuadrant-overview-create-button {
font-family: RedHatText, helvetica, arial, sans-serif;
}

0 comments on commit 70e325d

Please sign in to comment.