File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/ui-buttons/src/CondensedButton Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ class CondensedButton extends Component<CondensedButtonProps> {
5353 interaction : undefined ,
5454 color : 'primary' ,
5555 margin : '0' ,
56- cursor : 'pointer'
56+ cursor : 'pointer' ,
57+ display : 'inline-block'
5758 }
5859
5960 _baseButton : BaseButton | null = null
@@ -91,6 +92,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
9192 cursor,
9293 href,
9394 renderIcon,
95+ display,
9496 ...props
9597 } = this . props
9698
@@ -100,6 +102,7 @@ class CondensedButton extends Component<CondensedButtonProps> {
100102 < BaseButton
101103 { ...passthroughProps ( props ) }
102104 isCondensed
105+ display = { display }
103106 withBackground = { false }
104107 withBorder = { false }
105108 type = { type }
Original file line number Diff line number Diff line change @@ -98,6 +98,11 @@ type CondensedButtonOwnProps = {
9898 onClick ?: (
9999 event : React . KeyboardEvent < ViewProps > | React . MouseEvent < ViewProps >
100100 ) => void
101+
102+ /**
103+ * The CSS display property of the button, `inline-block` or `block`
104+ */
105+ display ?: 'inline-block' | 'block'
101106}
102107
103108type PropKeys = keyof CondensedButtonOwnProps
@@ -108,6 +113,7 @@ type CondensedButtonProps = CondensedButtonOwnProps &
108113 WithStyleProps < BaseButtonTheme , null > &
109114 OtherHTMLAttributes < CondensedButtonOwnProps > &
110115 ToProp
116+
111117const allowedProps : AllowedPropKeys = [
112118 'as' ,
113119 'children' ,
@@ -120,7 +126,8 @@ const allowedProps: AllowedPropKeys = [
120126 'renderIcon' ,
121127 'size' ,
122128 'type' ,
123- 'onClick'
129+ 'onClick' ,
130+ 'display'
124131]
125132
126133export type { CondensedButtonProps }
You can’t perform that action at this time.
0 commit comments