Wrap HStack in some places
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
38012ddff4
commit
d074553e21
3 changed files with 6 additions and 3 deletions
|
@ -54,7 +54,7 @@ const PollFooter: React.FC<IPollFooter> = ({ poll, showResults, selected }): JSX
|
|||
</Button>
|
||||
)}
|
||||
|
||||
<HStack space={1.5} alignItems='center'>
|
||||
<HStack space={1.5} alignItems='center' wrap>
|
||||
{poll.pleroma.get('non_anonymous') && (
|
||||
<>
|
||||
<Tooltip text={intl.formatMessage(messages.nonAnonymous)}>
|
||||
|
|
|
@ -42,11 +42,13 @@ interface IHStack {
|
|||
grow?: boolean,
|
||||
/** Extra CSS styles for the <div> */
|
||||
style?: React.CSSProperties
|
||||
/** Whether to let the flexbox wrap onto multiple lines. */
|
||||
wrap?: boolean,
|
||||
}
|
||||
|
||||
/** Horizontal row of child elements. */
|
||||
const HStack = forwardRef<HTMLDivElement, IHStack>((props, ref) => {
|
||||
const { space, alignItems, grow, justifyContent, className, ...filteredProps } = props;
|
||||
const { space, alignItems, grow, justifyContent, wrap, className, ...filteredProps } = props;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -60,6 +62,7 @@ const HStack = forwardRef<HTMLDivElement, IHStack>((props, ref) => {
|
|||
// @ts-ignore
|
||||
[spaces[space]]: typeof space !== 'undefined',
|
||||
'flex-grow': grow,
|
||||
'flex-wrap': wrap,
|
||||
}, className)}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -99,7 +99,7 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
|
|||
|
||||
{quote}
|
||||
|
||||
<HStack justifyContent='between' alignItems='center' className='py-2'>
|
||||
<HStack justifyContent='between' alignItems='center' className='py-2' wrap>
|
||||
<StatusInteractionBar status={actualStatus} />
|
||||
|
||||
<HStack space={1} alignItems='center'>
|
||||
|
|
Loading…
Reference in a new issue