支持 auto样式

This commit is contained in:
2betop 2021-08-05 17:17:04 +08:00
parent e3d503fc5f
commit 26f42b5a06
2 changed files with 11 additions and 1 deletions

View File

@ -14,6 +14,12 @@
flex-grow: unset;
flex-basis: unset;
}
&--auto {
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
}
&.#{$ns}Hbox--xs {

View File

@ -137,7 +137,11 @@ export default class HBox extends React.Component<HBoxProps, object> {
key={key}
className={cx(
`Hbox-col`,
style.width ? 'Hbox-col--customWidth' : '',
style.width === 'auto'
? 'Hbox-col--auto'
: style.width
? 'Hbox-col--customWidth'
: '',
(column as HBoxColumn).columnClassName
)}
style={style}