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> {
5656 interaction : undefined ,
5757 color : 'primary' ,
5858 margin : '0' ,
59- cursor : 'pointer'
59+ cursor : 'pointer' ,
60+ display : 'inline-block'
6061 }
6162
6263 _baseButton : BaseButton | null = null
@@ -94,6 +95,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
9495 cursor,
9596 href,
9697 renderIcon,
98+ display,
9799 ...props
98100 } = this . props
99101
@@ -103,6 +105,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
103105 < BaseButton
104106 { ...passthroughProps ( props ) }
105107 isCondensed
108+ display = { display }
106109 withBackground = { false }
107110 withBorder = { false }
108111 type = { type }
Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ type CondensedButtonOwnProps = {
101101 onClick ?: (
102102 event : React . KeyboardEvent < ViewProps > | React . MouseEvent < ViewProps >
103103 ) => void
104+
105+ /**
106+ * The CSS display property of the button, `inline-block` or `block`
107+ */
108+ display ?: 'inline-block' | 'block'
104109}
105110
106111type PropKeys = keyof CondensedButtonOwnProps
@@ -124,7 +129,8 @@ const propTypes: PropValidators<PropKeys> = {
124129 cursor : PropTypes . string ,
125130 href : PropTypes . string ,
126131 renderIcon : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . func ] ) ,
127- onClick : PropTypes . func
132+ onClick : PropTypes . func ,
133+ display : PropTypes . oneOf ( [ 'inline-block' , 'block' ] )
128134}
129135
130136const allowedProps : AllowedPropKeys = [
@@ -139,7 +145,8 @@ const allowedProps: AllowedPropKeys = [
139145 'renderIcon' ,
140146 'size' ,
141147 'type' ,
142- 'onClick'
148+ 'onClick' ,
149+ 'display'
143150]
144151
145152export type { CondensedButtonProps }
You can’t perform that action at this time.
0 commit comments