-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add optional className props (#912)
* fix: optional className not being passed to the Flex.tsx & FlexItem.tsx components. This change explicity combines classNames via the Emotion's cx utility. classNames were incorrectly passed into Emotion's css util, which resulted in the classNames disappearing. * feat: add optional className props to Actions and Graphic Elements components. This allows the developer user to add custom styling. * feat: add optional header.className prop to Card Allows the developer user to add custom styling. * test: update snapshot tests * chore: format comments for consistency
- Loading branch information
1 parent
666ba73
commit c47eb90
Showing
9 changed files
with
104 additions
and
27 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
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
10 changes: 9 additions & 1 deletion
10
packages/inlineBorderedItems/components/InlineBorderedItems.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 |
---|---|---|
@@ -1,19 +1,27 @@ | ||
import * as React from "react"; | ||
import { cx } from "@emotion/css"; | ||
import { SpaceSize } from "../../shared/styles/styleUtils/modifiers/modifierUtils"; | ||
import { inlineBorderedItems } from "../style"; | ||
|
||
export interface InlineBorderedItemsProps { | ||
children: | ||
| Array<React.ReactElement<HTMLElement>> | ||
| React.ReactElement<HTMLElement>; | ||
/** | ||
* Allows custom styling | ||
*/ | ||
className?: string; | ||
gutterSize?: SpaceSize; | ||
} | ||
|
||
const InlineBorderedItems = ({ | ||
children, | ||
className, | ||
gutterSize = "s" | ||
}: InlineBorderedItemsProps) => ( | ||
<div className={inlineBorderedItems(gutterSize!)}>{children}</div> | ||
<div className={cx(inlineBorderedItems(gutterSize!), className)}> | ||
{children} | ||
</div> | ||
); | ||
|
||
export default InlineBorderedItems; |