mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-16 09:31:50 +02:00
💄 Move action bar (#1184)
This commit is contained in:
parent
5123f72d57
commit
278713d57f
2 changed files with 31 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { cn } from "@rallly/ui";
|
import { cn } from "@rallly/ui";
|
||||||
import { Badge } from "@rallly/ui/badge";
|
import { Badge } from "@rallly/ui/badge";
|
||||||
import { Button } from "@rallly/ui/button";
|
import { Button } from "@rallly/ui/button";
|
||||||
import { Card, CardFooter, CardHeader, CardTitle } from "@rallly/ui/card";
|
import { Card, CardHeader, CardTitle } from "@rallly/ui/card";
|
||||||
import { Icon } from "@rallly/ui/icon";
|
import { Icon } from "@rallly/ui/icon";
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
|
||||||
import {
|
import {
|
||||||
|
@ -309,6 +309,35 @@ const DesktopPoll: React.FunctionComponent = () => {
|
||||||
: null}
|
: null}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{mode === "new" ? (
|
||||||
|
<div className="sticky left-[240px] flex w-[calc(100%-240px)] items-center justify-between gap-4 border-l border-t bg-gray-50 p-3">
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
votingForm.cancel();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Trans i18nKey="cancel" />
|
||||||
|
</Button>
|
||||||
|
<p className="hidden min-w-0 truncate text-sm md:block">
|
||||||
|
<Trans
|
||||||
|
i18nKey="saveInstruction"
|
||||||
|
values={{
|
||||||
|
action: mode === "new" ? t("continue") : t("save"),
|
||||||
|
}}
|
||||||
|
components={{
|
||||||
|
b: <strong className="font-semibold" />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="primary"
|
||||||
|
form="voting-form"
|
||||||
|
>
|
||||||
|
<Trans i18nKey="continue" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</RemoveScroll>
|
</RemoveScroll>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
@ -328,29 +357,6 @@ const DesktopPoll: React.FunctionComponent = () => {
|
||||||
</EmptyStateDescription>
|
</EmptyStateDescription>
|
||||||
</EmptyState>
|
</EmptyState>
|
||||||
)}
|
)}
|
||||||
{mode === "new" ? (
|
|
||||||
<CardFooter className="flex items-center justify-between">
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
votingForm.cancel();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Trans i18nKey="cancel" />
|
|
||||||
</Button>
|
|
||||||
<p className="text-sm">
|
|
||||||
<Trans
|
|
||||||
i18nKey="saveInstruction"
|
|
||||||
values={{
|
|
||||||
action: mode === "new" ? t("continue") : t("save"),
|
|
||||||
}}
|
|
||||||
components={{ b: <strong className="font-semibold" /> }}
|
|
||||||
/>
|
|
||||||
</p>
|
|
||||||
<Button type="submit" variant="primary" form="voting-form">
|
|
||||||
<Trans i18nKey="continue" />
|
|
||||||
</Button>
|
|
||||||
</CardFooter>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,7 +53,7 @@ const DialogContent = React.forwardRef<
|
||||||
<DialogPrimitive.Content
|
<DialogPrimitive.Content
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"animate-in data-[state=open]:fade-in data-[state=open]:slide-in-from-top-8 shadow-huge z-50 grid w-full translate-y-0 gap-4 overflow-hidden rounded-md bg-gray-50 p-4",
|
"animate-in data-[state=open]:fade-in data-[state=open]:slide-in-from-top-8 shadow-huge z-50 grid w-full translate-y-0 gap-4 overflow-hidden rounded-md bg-white p-4",
|
||||||
{
|
{
|
||||||
"sm:max-w-sm": size === "sm",
|
"sm:max-w-sm": size === "sm",
|
||||||
"sm:max-w-md": size === "md",
|
"sm:max-w-md": size === "md",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue