Skip to content

Commit

Permalink
Fix missing docs button (#1265)
Browse files Browse the repository at this point in the history
* Fix missing docs button

* Add note about which model is being used
  • Loading branch information
thekevinscott authored Nov 18, 2023
1 parent 81e1fd0 commit 746564f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/src/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import '@shoelace-style/shoelace/dist/components/button/button.js';
import { useShoelaceEventListener } from '@site/src/hooks/useShoelaceEventListener';
import { SlButton as _SlButton} from '@shoelace-style/shoelace/dist/react';
import { SlButton as _SlButton } from '@shoelace-style/shoelace/dist/react';
import { SlButton } from '@shoelace-style/shoelace';
import { CustomElement } from '@site/src/utils/customElement';

interface IProps extends Omit<React.ComponentProps<typeof _SlButton>, 'className'>{
interface IProps extends Omit<React.ComponentProps<typeof _SlButton>, 'className'> {
class?: string;
onClick?: () => void;
onClick?: () => void;
}
export const Button = ({ onClick, draggable, translate, ...props }: IProps) => {
const ref = useShoelaceEventListener<HTMLButtonElement>(onClick, 'click', 'touch');
Expand Down
6 changes: 4 additions & 2 deletions docs/src/components/demo/components/uploadPane/uploadPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styles from './uploadPane.module.scss';
import { Button } from '@site/src/components/button/button';
import Pane from '../pane/pane';
import Upload from '../upload/upload';
import Link from '@docusaurus/Link';

export default function UploadPane({
size,
Expand All @@ -12,15 +13,16 @@ export default function UploadPane({
return (
<Upload>
{({ isDragActive }) => (
<Pane
<Pane
classes={{
[styles.active]: isDragActive,
[styles.uploadPane]: true,
}}
size={size}
>
<p>Upload an image from your computer, or choose from one of the images in the search field.</p>
<Button size="large" variant="primary">{isDragActive ? 'Drop Image' : 'Upload Image' }</Button>
<p>This demo is using the <Link style={{ margin: 3 }} to="/models/available/upscaling/esrgan-medium"> ESRGAN Medium </Link> model. </p>
<Button size="large" variant="primary">{isDragActive ? 'Drop Image' : 'Upload Image'}</Button>
</Pane>
)}
</Upload>
Expand Down

0 comments on commit 746564f

Please sign in to comment.