Skip to content

Commit

Permalink
feat(ux): Open failed action results by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Jun 10, 2022
1 parent 9b7c2b2 commit eca78f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/common/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface ModalProps {
const Modal: React.FC<ModalProps> = ({ open, title, onClose, actions, children, height }) => {
return (
<Transition.Root show={open} as={React.Fragment}>
<Dialog as="div" className="fixed z-100 inset-0 overflow-y-auto" onClose={onClose}>
<Dialog as="div" className="fixed z-99999 inset-0 overflow-y-auto" onClose={onClose}>
<div className="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center block">
<Transition.Child
as={React.Fragment}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/editor/toolbar/modal/TestModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const ActionResult: React.FC<ActionResultProps> = ({ result, connect }) => {
/>
</div>
<div className="m-1" />
<Disclosure>
<Disclosure defaultOpen={result.status === ActionResultStatus.Failure}>
{({ open }) => (
<div
className={buildClassName([
Expand All @@ -299,7 +299,7 @@ const ActionResult: React.FC<ActionResultProps> = ({ result, connect }) => {
className={buildClassName([
{
classes: 'transform rotate-180',
append: open,
append: !open,
},
{
classes: 'block w-5 h-5',
Expand All @@ -309,7 +309,7 @@ const ActionResult: React.FC<ActionResultProps> = ({ result, connect }) => {
</Disclosure.Button>
<Disclosure.Panel className="text-sm w-full max-w-[600px]">
<div className="m-2 p-2 border border-black w-full">
<Disclosure>
<Disclosure defaultOpen={result.status === ActionResultStatus.Failure}>
{({ open }) => (
<div>
<Disclosure.Button className="inline-flex justify-between items-center w-full px-4 py-2 text-sm font-medium text-left focus:outline-none bg-black/[.1]">
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
80: '80',
90: '90',
100: '100',
99999: '99999',
},
},
},
Expand Down

0 comments on commit eca78f8

Please sign in to comment.