Skip to content

Commit

Permalink
Add container props
Browse files Browse the repository at this point in the history
  • Loading branch information
kapantzak committed Jan 17, 2025
1 parent 3243194 commit 0c86e3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/pill/alertMastercard.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ const AlertMasterCard = forwardRef(
pillLeft = {},
pillRight = {},
pillEnd,
containerProps = {},
round,
size,
...rest
},
ref
) => {
const commonProps = { height, round, size }
const commonProps = { height, round, size, ...containerProps }
const iconProps = {
background: masterCardColorMap.alert,
color: "text",
Expand Down
9 changes: 5 additions & 4 deletions src/components/pill/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import { getPillColor } from "./mixins/colors"
import getPillPadding from "./mixins/padding"

export const MasterCardContainer = styled(Flex).attrs(
({ background, height, onClick, round = 999, size }) => ({
({ background, height, onClick, round = 999, size, ...props }) => ({
background,
...(onClick && { cursor: "pointer" }),
position: "relative",
round,
size,
...props,
})
)`
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-select: ${({ noUserSelection }) => (noUserSelection ? "none" : "auto")};
-ms-user-select: ${({ noUserSelection }) => (noUserSelection ? "none" : "auto")};
user-select: ${({ noUserSelection }) => (noUserSelection ? "none" : "auto")};
* {
cursor: ${({ onClick }) => (onClick ? "pointer" : "inherit")};
Expand Down

0 comments on commit 0c86e3a

Please sign in to comment.