Skip to content

Commit

Permalink
Merge branch 'main' into snippets-js-every
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW authored Jan 17, 2025
2 parents 0104b17 + 4179ee2 commit 9134b80
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Delete
swizzle: true
---

`<DeleteButton>` uses Material UI's [`<LoadingButton>`](https://mui.com/material-ui/api/loading-button/#main-content) and [`<Dialog>`](https://mui.com/material-ui/react-dialog/) components.
`<DeleteButton>` uses Material UI's [`<Button>`](https://mui.com/material-ui/react-button) and [`<Dialog>`](https://mui.com/material-ui/react-dialog/) components.

When you try to delete something, a pop-up shows up and asks for confirmation. When confirmed, it executes the [`useDelete`](/docs/data/hooks/use-delete) method provided by your [`dataProvider`](/docs/data/data-provider).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ render(

:::simple External Props

It also accepts all props of Material UI [LoadingButton](https://mui.com/material-ui/api/loading-button/#main-content).
It also accepts all props of Material UI [Button](https://mui.com/material-ui/react-button).

:::

[button]: https://mui.com/material-ui/api/loading-button/#main-content
[button]: https://mui.com/material-ui/react-button/#loading-2
[useexport]: /docs/core/hooks/utilities/use-export
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ render(

:::simple External Props

It also accepts all props of Material UI [LoadingButton](https://mui.com/material-ui/api/loading-button/#main-content).
It also accepts all props of Material UI [Button](https://mui.com/material-ui/react-button).

:::

[button]: https://mui.com/material-ui/api/loading-button/#main-content
[button]: https://mui.com/material-ui/react-button/#loading-2
[useimport]: /docs/core/hooks/utilities/use-import
4 changes: 2 additions & 2 deletions documentation/src/refine-theme/common-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import clsx from "clsx";
import { motion, useScroll, useTransform } from "framer-motion";
import React, { useState } from "react";

import { RefineLogoXmas } from "./icons/refine-logo xmas";
import { HamburgerIcon } from "./icons/hamburger";

import { openFigma } from "../utils/open-figma";
Expand All @@ -14,6 +13,7 @@ import { TopAnnouncement } from "./top-announcement";

import { LandingGithubStarButton } from "./landing-github-star-button";
import SearchBar from "../theme/SearchBar";
import { RefineLogoIcon } from "./icons/refine-logo";

type Props = {
hasSticky?: boolean;
Expand Down Expand Up @@ -82,7 +82,7 @@ export const CommonHeader = ({
>
<div className={clsx("w-[130px]", "landing-lg:w-[200px]")}>
<Link to="/" onContextMenu={openFigma}>
<RefineLogoXmas className="text-gray-900 dark:text-gray-0" />
<RefineLogoIcon className="text-gray-900 dark:text-gray-0" />
</Link>
</div>
<button
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/refine-theme/landing-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export const LandingFooter = ({ variant = "landing" }: Props) => {
"font-normal",
)}
>
{2024, Refine from San Francisco to wherever you're with "}
{2025, Refine from San Francisco to wherever you're with "}
<HeartOutlinedIcon
className={clsx("ml-1", "text-refine-red", "inline", "leading-5")}
/>
Expand Down
89 changes: 49 additions & 40 deletions documentation/src/refine-theme/top-announcement.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
import clsx from "clsx";
import React, { type SVGProps } from "react";
import React from "react";
import { useLocation } from "@docusaurus/router";

export const TopAnnouncement = () => {
return (
<a
href="https://refine.dev/ai"
target="_blank"
rel="noopener noreferrer"
className={clsx(
"w-full",
"h-[48px]",
"relative",
"appearance-none",
"border-none",
"outline-none",
"cursor-pointer",
"flex items-center justify-center",
)}
>
<video
id="refine-ai-banner"
autoPlay
loop
muted
className="w-full h-[48px] object-cover"
poster="/assets/refine-ai-banner-bg.png"
>
<source
src="https://refine.ams3.cdn.digitaloceanspaces.com/website/static/refine-ai-banner.mp4"
type="video/mp4"
/>
</video>
const location = useLocation();

if (location.pathname === "/ai") {
return null;
}

<img
src="/assets/refine-ai-banner-text.png"
alt="Refine AI"
return (
<div className="not-prose">
<a
href="https://refine.dev/ai"
target="_blank"
rel="noopener noreferrer"
className={clsx(
"absolute",
"w-full",
"h-[48px]",
"left-1/2",
"-translate-x-1/2",
"top-1/2",
"-translate-y-1/2",
"relative",
"appearance-none",
"border-none",
"outline-none",
"cursor-pointer",
"flex items-center justify-center",
)}
/>
</a>
>
<video
id="refine-ai-banner"
autoPlay
loop
muted
className="w-full h-[48px] object-cover"
poster="/assets/refine-ai-banner-bg.png"
>
<source
src="https://refine.ams3.cdn.digitaloceanspaces.com/website/static/refine-ai-banner.mp4"
type="video/mp4"
/>
</video>

<img
src="/assets/refine-ai-banner-text.png"
alt="Refine AI"
className={clsx(
"absolute",
"h-[48px]",
"left-1/2",
"-translate-x-1/2",
"top-1/2",
"-translate-y-1/2",
)}
/>
</a>
</div>
);
};
2 changes: 1 addition & 1 deletion packages/mui/src/components/buttons/delete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import DeleteOutline from "@mui/icons-material/DeleteOutline";
import type { DeleteButtonProps } from "../types";

/**
* `<DeleteButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} and {@link https://mui.com/material-ui/react-dialog/#main-content `<Dialog>`} components.
* `<DeleteButton>` uses Material UI {@link https://mui.com/material-ui/react-button `<Button>`} and {@link https://mui.com/material-ui/react-dialog/#main-content `<Dialog>`} components.
* When you try to delete something, a dialog modal shows up and asks for confirmation. When confirmed it executes the `useDelete` method provided by your `dataProvider`.
*
* @see {@link https://refine.dev/docs/api-reference/mui/components/buttons/delete-button} for more details.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui/src/components/buttons/export/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ImportExportOutlined from "@mui/icons-material/ImportExportOutlined";
import type { ExportButtonProps } from "../types";

/**
* `<ExportButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} with a default export icon and a default text with "Export".
* `<ExportButton>` uses Material UI {@link https://mui.com/material-ui/react-button `<Button>`} with a default export icon and a default text with "Export".
* It only has presentational value.
*
* @see {@link https://refine.dev/docs/api-reference/mui/components/buttons/export-button} for more details.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui/src/components/buttons/import/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { ImportButtonProps } from "../types";

/**
* `<ImportButton>` is compatible with the {@link https://refine.dev/docs/api-reference/core/hooks/import-export/useImport/ `useImport`} core hook.
* It uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} and native html {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input `<input>`} element.
* It uses Material UI {@link https://mui.com/material-ui/react-button `<Button>`} and native html {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input `<input>`} element.
*
* @see {@link https://refine.dev/docs/api-reference/mui/components/buttons/import-button} for more details.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/mui/src/components/buttons/refresh/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import RefreshOutlined from "@mui/icons-material/RefreshOutlined";
import type { RefreshButtonProps } from "../types";

/**
* `<RefreshButton>` uses uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} component
* `<RefreshButton>` uses uses Material UI {@link https://mui.com/material-ui/react-button `<Button>`} component
* to update the data shown on the page via the {@link https://refine.dev/docs/api-reference/core/hooks/invalidate/useInvalidate `useInvalidate`} hook.
*
* @see {@link https://refine.dev/docs/api-reference/mui/components/buttons/refresh-button} for more details.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui/src/components/buttons/save/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SaveOutlined from "@mui/icons-material/SaveOutlined";
import type { SaveButtonProps } from "../types";

/**
* `<SaveButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} component.
* `<SaveButton>` uses Material UI {@link https://mui.com/material-ui/react-button `<Button>`} component.
* It uses it for presantation purposes only. Some of the hooks that refine has adds features to this button.
*
* @see {@link https://refine.dev/docs/api-reference/mui/components/buttons/save-button} for more details.
Expand Down

0 comments on commit 9134b80

Please sign in to comment.