Skip to content

Commit de43b48

Browse files
authored
Merge branch 'master' into v11_rc
2 parents 03af17a + c827833 commit de43b48

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/ui-buttons/src/CondensedButton/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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}

packages/ui-buttons/src/CondensedButton/props.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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

103108
type PropKeys = keyof CondensedButtonOwnProps
@@ -108,6 +113,7 @@ type CondensedButtonProps = CondensedButtonOwnProps &
108113
WithStyleProps<BaseButtonTheme, null> &
109114
OtherHTMLAttributes<CondensedButtonOwnProps> &
110115
ToProp
116+
111117
const 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

126133
export type { CondensedButtonProps }

0 commit comments

Comments
 (0)