File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react"
2
- import { Flex } from "@chakra-ui/react"
2
+ import { Flex , FlexProps } from "@chakra-ui/react"
3
3
4
- export interface IProps {
4
+ export interface IProps extends FlexProps {
5
5
children ?: React . ReactNode
6
6
className ?: string
7
7
isSecondary ?: boolean
@@ -12,7 +12,8 @@ const Pill: React.FC<IProps> = ({
12
12
children,
13
13
className,
14
14
isSecondary,
15
- color,
15
+ background,
16
+ ...rest
16
17
} ) => {
17
18
return isSecondary ? (
18
19
< Flex
@@ -28,12 +29,13 @@ const Pill: React.FC<IProps> = ({
28
29
borderRadius = "base"
29
30
fontSize = "xs"
30
31
className = { className }
32
+ { ...rest }
31
33
>
32
34
{ children }
33
35
</ Flex >
34
36
) : (
35
37
< Flex
36
- backgroundColor = { color ? color : "primary100" }
38
+ background = { background ?? "primary100" }
37
39
display = "inline-block"
38
40
color = "black300"
39
41
textTransform = "uppercase"
@@ -44,6 +46,7 @@ const Pill: React.FC<IProps> = ({
44
46
fontSize = "xs"
45
47
borderRadius = "base"
46
48
className = { className }
49
+ { ...rest }
47
50
>
48
51
{ children }
49
52
</ Flex >
You can’t perform that action at this time.
0 commit comments