223-fix-user-fed-card-wrapping (#226)

This commit is contained in:
Sarah Rambacher 2020-11-18 10:06:56 -05:00 committed by GitHub
parent 49ef2bd665
commit 7592621d77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 15 deletions

View file

@ -9,6 +9,8 @@ import {
Dropdown, Dropdown,
KebabToggle, KebabToggle,
Label, Label,
Flex,
FlexItem,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import "./keycloak-card.css"; import "./keycloak-card.css";
@ -53,15 +55,16 @@ export const KeycloakCard = ({
</CardHeader> </CardHeader>
<CardBody /> <CardBody />
<CardFooter> <CardFooter>
{footerText && footerText} <Flex>
{labelText && ( <FlexItem className="keycloak--keycloak-card__footer">
<Label {footerText && footerText}
color={labelColor || "gray"} </FlexItem>
className="keycloak__keycloak-card__footer-label" <FlexItem>
> {labelText && (
{labelText} <Label color={labelColor || "gray"}>{labelText}</Label>
</Label> )}
)} </FlexItem>
</Flex>
</CardFooter> </CardFooter>
</Card> </Card>
); );

View file

@ -1,3 +1,3 @@
.keycloak__keycloak-card__footer-label { .keycloak-admin--keycloak-card__footer-text {
margin-left: var(--pf-global--spacer--lg); --pf-l-flex--spacer: var(--pf-l-flex--spacer--lg);
} }

View file

@ -100,7 +100,10 @@ export const UserFederationSection = () => {
</DropdownItem>, </DropdownItem>,
]; ];
return ( return (
<GalleryItem key={index}> <GalleryItem
key={index}
className="keycloak-admin--user-federation__gallery-item"
>
<KeycloakCard <KeycloakCard
id={userFederation.id!} id={userFederation.id!}
dropdownItems={ufCardDropdownItems} dropdownItems={ufCardDropdownItems}

View file

@ -1,3 +1,7 @@
.keycloak__user-federation__dropdown { .keycloak__user-federation__dropdown {
margin-top: var(--pf-global--spacer--lg); margin-top: var(--pf-global--spacer--lg);
} }
.keycloak-admin--user-federation__gallery-item {
display: contents;
}