Skip to content

Commit

Permalink
feat: remove center
Browse files Browse the repository at this point in the history
  • Loading branch information
drewlyton committed Sep 30, 2024
1 parent 7a27651 commit d43421c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ interface BannerProps {
content: ReactNode
icon?: ComponentType
tone?: CardTone
center?: boolean
}

export function Banner(props: BannerProps) {
const {action, center, content, icon: Icon, tone = 'transparent', ...rest} = props
const {action, content, icon: Icon, tone = 'transparent', ...rest} = props

return (
<Card borderBottom paddingX={4} paddingY={2} tone={tone} {...rest}>
<Flex align="center" justify={center ? 'center' : undefined} gap={3}>
<Flex align="center" gap={3}>
{Icon && (
<Text size={0}>
<Icon />
</Text>
)}

<Flex align="center" flex={center ? undefined : 1} gap={2} paddingY={3}>
<Flex align="center" flex={1} gap={2} paddingY={3}>
{content}
</Flex>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export function PermissionCheckBanner({granted, requiredPermission}: PermissionC
/>
</Text>
}
center
action={
isOnlyViewer && roleRequestStatus && !requestStatusError && !requestStatusLoading
? {
Expand Down

0 comments on commit d43421c

Please sign in to comment.