diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 7b7f28a..a695cab 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -1,52 +1,30 @@ import './Modal.sass' import { type JSXElement, Show } from 'solid-js' -import gsap from 'gsap' interface Props { children: JSXElement background?: string color?: string border?: string - trigger: boolean opacity?: number } export default (props: Props) => { - let dialogRef!: HTMLDivElement - - // const openHandler = () => { - // gsap.to(dialogRef, { - // duration: 0, - // display: 'flex', - // ease: 'power2.out', - // }) - // } - - const closeHandler = () => { - gsap.to(dialogRef, { - duration: 0, - display: 'none', - ease: 'power2.out', - }) - } - return ( <> - - ) } diff --git a/src/components/Modal/ModalButton.tsx b/src/components/Modal/ModalButton.tsx new file mode 100644 index 0000000..e83f82f --- /dev/null +++ b/src/components/Modal/ModalButton.tsx @@ -0,0 +1,51 @@ +import './Modal.sass' +import { type JSXElement, Show, createSignal } from 'solid-js' +import Button from '../Button/Button' + +interface Props { + children: JSXElement + background?: string + color?: string + border?: string + opacity?: number + label: string + edges?: 'curved' | 'rounded' | 'flat' + design?: 'bu-primary' | 'bu-link' | 'bu-info' | 'bu-success' | 'bu-warning' | 'bu-danger' | 'bu-dark' | 'bu-light' | 'bu-text' | 'bu-ghost' | 'bo-primary' | 'bo-secondary' | 'bo-success' | 'bo-danger' | 'bo-warning' | 'bo-info' | 'bo-light' | 'bo-dark' | 'bo-link' + width?: number + wide?: boolean +} + +export default (props: Props) => { + const [isOpen, setIsOpen] = createSignal(false) + + const openHandler = () => { + setIsOpen(true) + } + + const closeHandler = () => { + setIsOpen(false) + } + + return ( + <> + +