File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
packages/ui-buttons/src/CondensedButton Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ class CondensedButton extends Component<CondensedButtonProps> {
56
56
interaction : undefined ,
57
57
color : 'primary' ,
58
58
margin : '0' ,
59
- cursor : 'pointer'
59
+ cursor : 'pointer' ,
60
+ display : 'inline-block'
60
61
}
61
62
62
63
_baseButton : BaseButton | null = null
@@ -94,6 +95,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
94
95
cursor,
95
96
href,
96
97
renderIcon,
98
+ display,
97
99
...props
98
100
} = this . props
99
101
@@ -103,6 +105,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
103
105
< BaseButton
104
106
{ ...passthroughProps ( props ) }
105
107
isCondensed
108
+ display = { display }
106
109
withBackground = { false }
107
110
withBorder = { false }
108
111
type = { type }
Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ type CondensedButtonOwnProps = {
101
101
onClick ?: (
102
102
event : React . KeyboardEvent < ViewProps > | React . MouseEvent < ViewProps >
103
103
) => void
104
+
105
+ /**
106
+ * The CSS display property of the button, `inline-block` or `block`
107
+ */
108
+ display ?: 'inline-block' | 'block'
104
109
}
105
110
106
111
type PropKeys = keyof CondensedButtonOwnProps
@@ -124,7 +129,8 @@ const propTypes: PropValidators<PropKeys> = {
124
129
cursor : PropTypes . string ,
125
130
href : PropTypes . string ,
126
131
renderIcon : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . func ] ) ,
127
- onClick : PropTypes . func
132
+ onClick : PropTypes . func ,
133
+ display : PropTypes . oneOf ( [ 'inline-block' , 'block' ] )
128
134
}
129
135
130
136
const allowedProps : AllowedPropKeys = [
@@ -139,7 +145,8 @@ const allowedProps: AllowedPropKeys = [
139
145
'renderIcon' ,
140
146
'size' ,
141
147
'type' ,
142
- 'onClick'
148
+ 'onClick' ,
149
+ 'display'
143
150
]
144
151
145
152
export type { CondensedButtonProps }
You can’t perform that action at this time.
0 commit comments