mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 15:30:40 +00:00
LF
This commit is contained in:
parent
0a359b0835
commit
bfe62d2209
@ -1,6 +1,5 @@
|
|||||||
import { Link } from "@mui/material";
|
import { Link, type ButtonProps } from "@mui/material";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { type ButtonishProps } from "./mui";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A button that looks like a link.
|
* A button that looks like a link.
|
||||||
@ -8,10 +7,9 @@ import { type ButtonishProps } from "./mui";
|
|||||||
* The use of this component is not encouraged. It is only useful in uncommon
|
* The use of this component is not encouraged. It is only useful in uncommon
|
||||||
* cases where we do not have sufficient space to include a proper button.
|
* cases where we do not have sufficient space to include a proper button.
|
||||||
*/
|
*/
|
||||||
export const LinkButton: React.FC<React.PropsWithChildren<ButtonishProps>> = ({
|
export const LinkButton: React.FC<
|
||||||
onClick,
|
React.PropsWithChildren<Pick<ButtonProps, "onClick">>
|
||||||
children,
|
> = ({ onClick, children }) => (
|
||||||
}) => (
|
|
||||||
<Link
|
<Link
|
||||||
component="button"
|
component="button"
|
||||||
sx={(theme) => ({
|
sx={(theme) => ({
|
||||||
@ -39,7 +37,7 @@ export const LinkButton: React.FC<React.PropsWithChildren<ButtonishProps>> = ({
|
|||||||
* Similar caveats as {@link LinkButton} apply.
|
* Similar caveats as {@link LinkButton} apply.
|
||||||
*/
|
*/
|
||||||
export const LinkButtonUndecorated: React.FC<
|
export const LinkButtonUndecorated: React.FC<
|
||||||
React.PropsWithChildren<ButtonishProps>
|
React.PropsWithChildren<Pick<ButtonProps, "onClick">>
|
||||||
> = ({ onClick, children }) => (
|
> = ({ onClick, children }) => (
|
||||||
<Link
|
<Link
|
||||||
component="button"
|
component="button"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user