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